Overview

Skill Level: Any

WMI provides out-of-the-box columns and rules for engagement models. Use this procedure to modify the engagement rules.

Step-by-step

  1. Update the engagement rules using PATCH

    Update segment rules by identifying the rule to change and the rule value. For example:

     

    curl -X PATCH -–header 'Content-Type: application/json' -–header 'Accept: application/json' --header 
    'Authorization: APIKey yourapikeyvalue' -d '{
    "id" : "wca.segment_by_rule_model.Default",
    "modelId": "segment_by_rule_model",
    "parameters": [
    {
    "name": "segmentRules",
    "value": [
    {
    "segmentName": "Opted-out",
    "conjunction": "",
    "columns": [
    {
    "columnUniqueName": "X_EMAIL_OPT_OUT_DATE",
    "filterValues": [],
    "operator": "is not null",
    "conjunction": ""
    },
    {
    "columnUniqueName": "X_EMAIL_OPT_OUT_DATE",
    "filterValues": "X_EMAIL_OPT_IN_DATE",
    "operator": ">=",
    "conjunction": "and"
    }
    ] },
    {
    "segmentName": "Opted-in",
    "conjunction": "",
    "columns": [
    {
    "columnUniqueName": "X_EMAIL_OPT_IN_DATE",
    "filterValues": "X_EMAIL_CAMPAIGN_DATE_N1",
    "operator": ">=",
    "conjunction": ""
    },
    [
    {
    "columnUniqueName": "X_EMAIL_CAMPAIGN_COUNT",
    "filterValues": [],
    "operator": "is null",
    "conjunction": "or"
    },
    {
    "columnUniqueName": "X_EMAIL_CAMPAIGN_COUNT",
    "filterValues": "0",
    "operator": "=",
    "conjunction": "or"
    },
    {
    "columnUniqueName": "X_EMAIL_CAMPAIGN_COUNT_N1",
    "filterValues": "0",
    "operator": "=",
    "conjunction": "or"
    },
    {
    "columnUniqueName": "X_EMAIL_CAMPAIGN_COUNT_N1",
    "filterValues": [],
    "operator": "is null",
    "conjunction": "or"
    }
    ] ] },
    {
    "segmentName": "Highly Engaged",
    "conjunction": "",
    "columns": [
    {
    "columnUniqueName": "X_EMAIL_INTERACTION_SCORE_N2",
    "filterValues": 0,
    "operator": ">",
    "conjunction": ""
    },
    {
    "columnUniqueName": "X_EMAIL_INTERCTN_SCORE_N2_CURR",
    "filterValues": 0,
    "operator": ">",
    "conjunction": "and"
    },
    {
    "columnUniqueName": "X_EMAIL_ENGAGED_PERCENTILE_N2",
    "filterValues": 80,
    "operator": ">=",
    "conjunction": "and"
    }
    ] },
    {
    "segmentName": "Engaged",
    "conjunction": "",
    "columns": [
    {
    "columnUniqueName": "X_EMAIL_INTERACTION_SCORE_N2",
    "filterValues": 0,
    "operator": ">",
    "conjunction": ""
    },
    {
    "columnUniqueName": "X_EMAIL_INTERCTN_SCORE_N2_CURR",
    "filterValues": 0,
    "operator": ">",
    "conjunction": "and"
    },
    {
    "columnUniqueName": "X_EMAIL_ENGAGED_PERCENTILE_N2",
    "filterValues": 80,
    "operator": "<",
    "conjunction": "and"
    }
    ] },
    {
    "segmentName": "Disengaged",
    "conjunction": "",
    "columns": [
    {
    "columnUniqueName": "X_EMAIL_INTERACTION_SCORE_N2",
    "filterValues": 0,
    "operator": "<=",
    "conjunction": ""
    },
    {
    "columnUniqueName": "X_EMAIL_INTERACTION_SCORE_CURR",
    "filterValues": 0,
    "operator": "<=",
    "conjunction": "and"
    }
    ] },
    {
    "segmentName": "Reengaged",
    "conjunction": "",
    "columns": [
    {
    "columnUniqueName": "X_EMAIL_INTERACTION_SCORE_CURR",
    "filterValues": 0,
    "operator": ">",
    "conjunction": ""
    },
    {
    "columnUniqueName": "X_EMAIL_INTERCTN_SCORE_N2_CURR",
    "filterValues": 0,
    "operator": "<=",
    "conjunction": "and"
    }
    ] },
    {
    "segmentName": "Opted-in",
    "conjunction": "else",
    "columns": [] }
    ] }
    ],
    "input": {
    "columns": [
    "*"
    ] }
    }'

Join The Discussion

Your email address will not be published. Required fields are marked *