A custom engagement metric is a measurement you define from your contact or membership data. An engagement scoring model component can use that metric to award points. This article explains how to create the metric; to use it in a model, see Engagement Scoring Models.
What It Controls
You can define a custom metric in one of two ways:
- Contact Fields — a formula, or expression, that checks each contact's own fields, including custom fields.
- Membership Fields — a formula that checks each membership's own fields, including custom fields.
A contact's CRM record and membership record store data in different places, and each one has its own custom fields. When you choose Contact Fields, your expression reads custom fields on the contact's CRM record, not the membership record, even when a membership field has a similar name.
Warning
The form also includes a third type, Rockset View, which uses a reporting view instead of an expression. Rhythm's scoring run cannot calculate this type of metric. You can save it without a warning, but your account's entire nightly scoring run fails the next time scoring runs. If you save this type by mistake, delete it or change its type. Deactivating it is not enough, because inactive metrics are still computed when existing components use them. Use Contact Fields or Membership Fields instead.
When the nightly scoring run reaches a model component that uses your metric, Rhythm evaluates your expression for each contact or membership row. It uses the result as that row's value for the component. If the result is not a number, or Rhythm cannot evaluate the expression for that row, it treats the value as 0 for that row.
Where to Find It
Go to Setup › Engagement › Custom Metrics. This opens Manage Custom Engagement Metrics.
- Create Custom Engagement Metric opens a blank form.
- The clone icon opens a new metric copied from that row, without its identifier.
- The edit icon opens that metric so you can change it.
- The delete icon removes the metric after you confirm.
Prerequisites
You need the permission your administrator grants for engagement scoring setup.
The Settings
| Setting | Options | Default | Effect |
|---|---|---|---|
| Name: | Any text | Empty | Required. This name appears when you choose a metric in a scoring model component |
| ID: | Letters, digits, underscores, colons, vertical bars, and hyphens | Suggested from the name | The metric's permanent identifier |
| Status: | Active, Inactive | Active | Controls whether the metric can be chosen for a new scoring model component. Deactivating it does not stop the nightly scoring run from computing it for components that already use it |
| Type: | Contact Fields, Membership Fields, Rockset View | Contact Fields | Where the value comes from |
| Expression: | A formula using field names | Empty | Required for Contact Fields and Membership Fields. Rhythm evaluates it for each row |
- Choose Type: — Contact Fields or Membership Fields.
- Use the field search box to find the exact field name you need, then copy it. Rhythm copies the field's exact name to your clipboard so you can paste it into your formula. It does not insert the field for you.
- Write your formula in Expression:, using the exact field names you copied.
- Save the metric.
Warning
Before saving, Rhythm checks your expression by running it once with every field empty. This catches a broken formula, but it does not catch a formula that works while pointing to the wrong field. If you mistype a field name, the metric can save successfully and quietly score everyone 0, with nothing explaining why. Use the field search box to copy exact names instead of typing them from memory.
Dependencies and Precedence
- A custom metric only matters after a scoring model component uses it.
- Rhythm measures a metric's monthly value on the night the scoring run computes it. If you change the metric's expression or type, the change only affects months that have not been measured yet. Past months keep the value produced by the old definition. Because the metric keeps the same identifier, its history can include values from before and after the change without showing when the change happened.
Change Impact and How to Revert
- Renaming a metric is safe.
- Editing the expression or type takes effect the next time the metric is measured. Past months are not recalculated.
- Deactivating a metric stops it from being offered for a new scoring model component. It does not stop the nightly run from computing it for components that already use it.
Warning
You cannot delete a custom metric while any scoring model component still uses it, including a component on an inactive or unchosen model. If you try, Rhythm refuses the deletion. Any measurements already recorded for the metric are not deleted with it.
Permissions
Setting up custom engagement metrics requires the permission your administrator grants for engagement scoring setup. There is no separate permission for creating, editing, or deleting metrics within that area.
Validation and Errors
If Rhythm cannot evaluate your expression at all, such as when it has a syntax mistake, Rhythm refuses the save and explains the problem. You must fill in the name, identifier, and the required field for your chosen type before you can save. The required field is the expression, or the view name for Rockset View.