Skip to content

Setting up suggestions


Anindita Basu    Feedback

Suggestions is not on self serve yet. You must use JSON to configure suggestions.

Before you configure suggestions, click through to read how suggestions and rules work together.

Suggestions

Suggestions work through rules. To set up suggestions, you first create rules at the global level, and then use that rule in a suggestion set at the module level. The following entity-relationship diagram shows how suggestions work.

erDiagram
  Suggestions ||--|{ Rules : uses
  Rules ||--|{ Rule_bindings : contains
  Rule_bindings }|--|{ Activities : "are for"
  Rule_bindings ||--|| Lists : "are for"
  Rules ||..o{ Other_rules : contains
  Other_rules ||--|{ Rule_bindings : contains

Suggestions contain the following options:

  • The time when the suggestion is to be shown
  • The roles that should see the suggestion
  • The text of the suggestion
  • The call-to-action (CTA)
Rules

Rules are defined at the global level, and then they're used at the module level. Rules are instances of a standard set of rule types (What are rule types?).

A rule can contain other rules too. For example, if there is a rule called Rule A, and another called Rule B, you can also have a rule called Rule C that's a combination of Rule A and Rule B. Every suggestion uses one or more rules.

Rule bindings

To associate a rule to a suggestion, you use rule bindings. There are two kinds of rule bindings.

Suggestion rule binding Filter rule binding
Use it for suggestions that use activities, for example, for a nudge when someone hasn't participated in 3 consecutive meetings. Use it for suggestions that use lists, for example, showing a list of leads that are in a state that can be closed soon. An attribute of a record, a module, a state, dates such as created date, last update date, or meeting date can be used as filters

The kind of rule binding to use when creating a suggestion is listed in the table at Rule types. A suggestion can use only one type of rule binding, either suggestion rule binding or filter rule binding, but not both.

Before you begin

Review the structure of the various JSON objects that you must change (an example configuration is at Example configuration). The following table shows you which JSON objects to use for a particular outcome.

What you want to specify Where is it specified
The time that the suggestion is to be shown. In the maxSuggestionDisplayAtAMoment and maxSuggestionDisplayInDay parameters.
The time that's to be reckoned as beginning-of-day and end-of-day. In the suggestionSchedule parameter.
The text of the suggestion. In the suggestionSets object. However, the variables can only be those fields and attributes that can be used in that module
The people or roles that the suggestion is sent to. In the suggestionSets > userSelectionCriteria > userRole object.
The partners tiers that are considered. In the the suggestionSets object.
The weights for prioritization. In the prioritizationConfig object.
The call to action (CTA) options In the ctaMappings object.

After suggestions are set up, this is what they look like on the app.

leads list suggestion

activity details suggestion

Steps

Before you can create a module-level suggestion, you must create a global rule. The steps are:

  1. Create a global rule by using one of the standard rule types (through the rules object).
  2. Create a suggestion by calling the rule you created in the previous step. You can do this globally, or for specific modules, or both:
    • Globally (through the clientSuggestionConfig object)
    • In the modules (through the moduleSuggestionConfig object)

Here are the steps.

  1. Log in to the Vymo web app.
  2. Click Customize > Global Settings > JSON Configurations.
  3. Locate the rules object, and create a rule object (show me how to create a JSON object).
  4. In this rule object, copy the JSON code snippet given in Example code: Global rule and change the values for the following parameters (for descriptions of these parameters, see Suggestions reference):
    • code, which is a string that is used as the code for referring to this rule.
    • attribute, which is the code of the attribute to use for the rule.
    • listOperator, which is a logical operator.
  5. Save your changes.
  1. Log in to the Vymo web app.
  2. Click Customize > Global Settings > JSON Configurations.
  3. Locate the clientSuggestionConfig object, and create a suggestion object in suggestionSet (show me how to create a JSON object).
  4. In this suggestion object, copy the JSON code snippet given in Example code: Global suggestion, and then, change the values of at least the following parameters:
    • code, filterRuleBindings.rule, filterRuleBindings.param, and filterRuleBindings.value.
  5. Save your changes.
  1. Log in to the Vymo web app.
  2. Click Customize > Module Settings > pencil icon for the module > JSON View.
  3. Locate the moduleSuggestionConfig object and create a suggestion object in suggestionSet (show me how to create a JSON object).
  4. In this suggestion object, copy the JSON code snippet given in Example code: Module suggestion, and then, change the values of at least the following parameters:
    • In filterRuleBindings, in rule, specify the code you entered as code in the global rule that you created.
    • In filterRuleBindings, in ruleInputBindings, in param, specify the code you noted from the inputParams object in the global rule that you created.
    • In filterRuleBindings, in ruleInputBindings, in value, specify the code for whatever it is that this rule type is for. For example, if the rule type is voAttribute, enter the code of the attribute to use. Or, if the rule type is voState, enter the code for the state to use.
  5. Optionally, change the values of the following parameter:
    • In userSelectionCriteria, in userAttributeFilters, specify an attribute to use for filtering users. Enter the attribute code in attribute and, in values, specify a comma-separated list of the values of that attribute. For example, to display a suggestion to only those people whose roles are BDR and ASM, enter role for the attribute parameter and ["BDR","ASM"] for the values parameter.
  6. Make sure the value of the code parameter in suggestions is the same as the value of the code parameter of the suggestion itself.
  7. Save your changes.

What to do next

Now that the suggestion rules are in place, you can do these things:

Specifying the display order

You can specify the order in which the suggestions are displayed on the Suggestions card. For example, the following image shows a suggestion card with three suggestions (shown by the three grey circles on the card); these three suggestions can be seen by swiping to the left or right. You can specify the order of this sequence.

suggestion example

To specify the order of display:

  1. Log in to the Vymo web app.
  2. Click Customize > Global Settings > JSON Configurations.
  3. Locate the clientSuggestionConfig object, and expand prioritizationConfig.
  4. In the valueConfigList object, specify the weights for the suggestions. For example, in the following code snippet, the suggestions from the module called cross-sell_opportunities are displayed before those from agents_agency. For an explanation of the parameters, see the clientSuggestionConfig object.
    "valueConfigList": [
          {
            "weight": 30,
            "module": "cross-sell_opportunities"
          },
          {
            "weight": 10,
            "module": "agents_agency"
          }
        ]
    
  5. When done, save your changes and release them.

Example configuration

These tabs contain the code you can copy, and instructions for changing the bits that you need to.

This code goes into Global Settings > JSON Configurations > rules.

  • Change the values in line numbers 2, 25, and 26.
  • Make note of the value in line number 2; you need it for rule binding when creating a suggestion in a module.
  • Also make a the value in line number 9; you need it for rule binding when creating a suggestion in a module.
  • Every rule type has its own JSON structure. The example here is of the voAttribute rule type. For snippets of other rule types, see Sample code for rule types.
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{
  "type": "voAttribute",
  "code": "enter_a_descriptive_string_to_easily_identify_the_rule_for_example_subCampaignContains",
  "deleted": false,
  "inputParams": [
    {
      "disabled": false,
      "order": null,
      "param": "voAttributeList",
      "variableType": "text",
      "multi": true,
      "required": true
    }
  ],
  "outputParams": [
    {
      "disabled": false,
      "order": null,
      "param": "vos",
      "variableType": "vo_code",
      "multi": true,
      "required": true
    }
  ],
  "attribute": "enter_the_code_of_the_attribute_to_use_for_example_the_subcampaign_code",
  "listOperator": "enter_the_list_operator_for_example_IN"
}

This code goes into Global Settings > JSON Configurations > clientSuggestionConfig.

  • Change the values in line numbers 2, 16, 22, 31, 35, 36, 52, 53, 54, and 68.
  • For line number 16, see user roles.
  • For line number 22, enter a comma-separated list of the user roles that this suggestion must be displayed to.
  • For line number 35, use the value you noted from line number 9 of the global rule.
  • For line number 36, enter the value that the parameter in line 35 should contain.
  • The text in line 54 contains extra spaces around the braces. When creating a suggestion, delete these extra spaces.
  • Make sure the value of the code parameter in suggestions (line 68 in this example) is the same as the value of the code parameter in line 2.
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
{
  "code": "suggestionForLeadModule",
  "deleted": false,
  "areSuggestionsEnabled": true,
  "areExternalSuggestionsEnabled": false,
  "iosMinVersion": 0,
  "appMinVersion": 0,
  "suggestionSets": {
    "SuggestionForLeads": {
      "code": "SuggestionForLeads",
      "deleted": false,
      "suggestionType": "LEADS",
      "suggestionSchedule": "BOD",
      "suggestionSetDismissDuration": 720,
      "userSelectionCriteria": {
        "userRole": "ASSIGNEE",
        "userAttributeFilters": [
          {
            "disabled": false,
            "order": null,
            "attribute": "role",
            "values": [
              "BDM",
              "BDM CREDIT LIFE"
            ]
          }
        ]
      },
      "filterRuleBindings": [
        {
          "rule": "voStateContains",
          "ruleInputBindings": [
            {
              "type": "value",
              "param": "voState",
              "value": "[\"lead_new\"]"
            }
          ],
          "ruleOutputBindings": [
            {
              "type": "variable",
              "param": "vos",
              "variable": "vo_code_list",
              "dimension": null
            }
          ]
        }
      ],
      "suggestions": [
        {
          "suggestionDisplay": {
            "title": "New lead lies unattended",
            "subTitle": "Must contact within 24 hours",
            "message": "Hey { { {userName } } }, you haven't looked yet at { { { leadName } } } assigned to you. Schedule a call?",
            "ctaMappings": [
              {
                "disabled": false,
                "order": null,
                "code": "Leads",
                "inputBindings": null,
                "ctaType": null
              }
            ]
          },
          "ruleBinding": null,
          "name": "Suggestion for Leads",
          "order": 0,
          "code": "suggestionForLeadModule",
          "suggestionEnabled": true,
          "templateCode": null,
          "experimentTags": null
        }
      ]
    }
  },
  "suggestionSetMappings": [
    {
      "disabled": false,
      "order": 1,
      "suggestionSet": "SuggestionForLeads"
    }
  ]
  "beta": null,
    "shouldShowUniqueFlavours": null,
    "maxSuggestionDisplayAtAMoment": null,
    "maxSuggestionDisplayInDay": null,
    "shouldShowBODSuggestionThroughTheDay": true,
    "shouldShowSuggestionOnHoliday": true,
    "prioritizationConfig": {
      "prioritizationParameterListBOD": [
        {
          "type": "voAttribute",
          "defaultWeight": 8,
          "attribute": "priority_0gjj9k68jh",
          "valueConfigList": [
            {
              "weight": 10,
              "attributeValue": "Low"
            },
            {
              "weight": 10,
              "attributeValue": "Medium"
            },
            {
              "weight": 10,
              "attributeValue": "High"
            }
           ]
        },
        {
          "type": "voModule",
          "defaultWeight": 5,
          "valueConfigList": [
            {
              "weight": 30,
              "module": "cross-sell_opportunities"
            },
            {
              "weight": 10,
              "module": "agents_agency"
            },
            {
              "weight": 20,
              "module": "advisor_agreements"
            }
          ]
        },
        {
          "type": "voState",
          "defaultWeight": 6,
          "valueConfigList": [
            {
              "weight": 10,
              "state": "wt4e890mbg"
            },
            {
              "weight": 9,
              "state": "cross-sell_opportunities_new"
            },
            {
              "weight": 20,
              "state": "89q04kdxr9"
            }
          ]
        },
        {
          "type": "voAttribute",
          "defaultWeight": 7,
          "attribute": "status",
          "valueConfigList": [
            {
              "weight": 10,
              "attributeValue": "Inactive"
            },
            {
              "weight": 10,
              "attributeValue": "Active"
            }
          ]
        },
        {
          "type": "voAttribute",
          "defaultWeight": 20,
          "attribute": "production_uz3y06u87g",
          "valueConfigList": [
            {
              "weight": 40,
              "attributeValue": "Yes"
            },
            {
              "weight": 2,
              "attributeValue": "No"
            }
          ]
        }
      ],
      "prioritizationParameterListLive": null,
      "prioritizationParameterListTieBreaker": null
    }
  }
}

This code goes into Module Settings > JSON Configurations > moduleSuggestionConfig.

  • Change the values in line numbers 2, 16, 22, 31, 35, 36, 52, 53, 54, and 68.
  • For line number 16, see user roles.
  • For line number 22, enter a comma-separated list of the user roles that this suggestion must be displayed to.
  • For line number 35, use the value you noted from line number 9 of the global rule.
  • For line number 36, enter the value that the parameter in line 35 should contain.
  • The text in line 54 contains extra spaces around the braces. When creating a suggestion, delete these extra spaces.
  • Make sure the value of the code parameter in suggestions (line 68 in this example) is the same as the value of the code parameter in line 2.
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{
  "code": "suggestionForLeadModule",
  "deleted": false,
  "areSuggestionsEnabled": true,
  "areExternalSuggestionsEnabled": false,
  "iosMinVersion": 0,
  "appMinVersion": 0,
  "suggestionSets": {
    "SuggestionForLeads": {
      "code": "SuggestionForLeads",
      "deleted": false,
      "suggestionType": "LEADS",
      "suggestionSchedule": "BOD",
      "suggestionSetDismissDuration": 720,
      "userSelectionCriteria": {
        "userRole": "ASSIGNEE",
        "userAttributeFilters": [
          {
            "disabled": false,
            "order": null,
            "attribute": "role",
            "values": [
              "BDM International Operations",
              "BDM LOTUS"
            ]
          }
        ]
      },
      "filterRuleBindings": [
        {
          "rule": "voStateContains",
          "ruleInputBindings": [
            {
              "type": "value",
              "param": "voState",
              "value": "[\"lead_new\"]"
            }
          ],
          "ruleOutputBindings": [
            {
              "type": "variable",
              "param": "vos",
              "variable": "vo_code_list",
              "dimension": null
            }
          ]
        }
      ],
      "suggestions": [
        {
          "suggestionDisplay": {
            "title": "New lead lies unattended",
            "subTitle": "Must contact within 24 hours",
            "message": "Hey { { {userName } } }, you haven't looked yet at { { { leadName } } } assigned to you. Schedule a call?",
            "ctaMappings": [
              {
                "disabled": false,
                "order": null,
                "code": "Leads",
                "inputBindings": null,
                "ctaType": null
              }
            ]
          },
          "ruleBinding": null,
          "name": "Suggestion for Leads",
          "order": 0,
          "code": "suggestionForLeadModule",
          "suggestionEnabled": true,
          "templateCode": null,
          "experimentTags": null
        }
      ]
    }
  },
  "suggestionSetMappings": [
    {
      "disabled": false,
      "order": 1,
      "suggestionSet": "SuggestionForLeads"
    }
  ]
}

See also


Did this page help? No help at allYes, totally!
Back to top