Define a Custom Context Variable

Follow these steps to define a custom variable that you can use as Engine Context for Automated Personalization experiences.

If you're an Engine API client, you only need to use the monetate:context:CustomVariables event to pass the custom context variable and its value to Monetate.

  1. Click COMPONENTS in the top navigation bar, and then select Custom Variables.

    Callout of the Custom Variables option in the COMPONENTS menu

  2. Click DEFINE CUSTOM VARIABLE.

    Callout of the DEFINE CUSTOM VARIABLE button on the Custom Variables list page

  3. Give the new custom variable a name in the Define a Custom Variable modal.

    Callout of the Name field on the Define a Custom Variable modal

  4. Type a brief description of the custom variable.

    Callout of the Description field on the Define a Custom Variable modal

  5. Select the appropriate data type for the custom context variable's value.

    The data type that you select must be the same data type of the value passed to Monetate in the setCustomVariables method.

    • Boolean — The value passed to Monetate represents either a true state (yes, true, or 1) or a false state (no, false, or 0)
    • Categorical — The value passed to Monetate is a string representing several options (for example, levels of a customer loyalty program)
    • Numeric — The value passed to Monetate is an integer or decimal

    Callout of the BOOLEAN, CATEGORIGAL, and NUMERIC data type options on the Define a Custom Variable modal

  6. Click SAVE.

    Callout of the SAVE button on the Define a Custom Variable modal

After you save the new custom variable, it's available on the Engine Context page of the platform settings as well as in the Engine Context options of the HOW settings for an Automated Personalization experience.

Deleting a Custom Context Variable

You cannot delete a custom context variable if it's part of any active Automated Personalization experiences.

Follow these steps to delete a custom context variable in the Monetate platform.

  1. Click COMPONENTS in the top navigation bar, and then select Custom Variables.

    Callout of the Custom Variables option in the COMPONENTS menu

  2. Click the additional options menu (...) for the variable that you want to delete, and then select Delete Custom Variable.

    Animated demonstration of a user clicking the additional options menu for a custom context variable and then selecting the 'Delete Custom Variable' option

If you're still passing the custom context variable to Monetate using setCustomVariables after you delete it in the platform, then the personalization engine doesn't use it.