Setting up suggestions
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.
mermaid
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. |
Steps
Before you can create a module-level suggestion, you must create a global rule. The steps are:
- Create a global rule by using one of the standard rule types (through the
rules
object). - 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)
- Globally (through the
Here are the steps.
- Log in to the Vymo web app.
- Click Customize > Global Settings > JSON Configurations.
- Locate the
rules
object, and create a rule object (show me how to create a JSON object). - 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.
- Save your changes.
- Log in to the Vymo web app.
- Click Customize > Global Settings > JSON Configurations.
- Locate the
clientSuggestionConfig
object, and create a suggestion object insuggestionSet
(show me how to create a JSON object). - 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
, andfilterRuleBindings
.value
.
- Save your changes.
- Log in to the Vymo web app.
- Click Customize > Module Settings > pencil icon :material-lead-pencil: for the module > JSON View.
- Locate the
moduleSuggestionConfig
object and create a suggestion object insuggestionSet
(show me how to create a JSON object). - 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
, inrule
, specify the code you entered ascode
in the global rule that you created. - In
filterRuleBindings
, inruleInputBindings
, inparam
, specify the code you noted from theinputParams
object in the global rule that you created. - In
filterRuleBindings
, inruleInputBindings
, invalue
, specify the code for whatever it is that this rule type is for. For example, if the rule type isvoAttribute
, enter the code of the attribute to use. Or, if the rule type isvoState
, enter the code for the state to use.
- In
- Optionally, change the values of the following parameter:
- In
userSelectionCriteria
, inuserAttributeFilters
, specify an attribute to use for filtering users. Enter the attribute code inattribute
and, invalues
, specify a comma-separated list of the values of that attribute. For example, to display a suggestion to only those people whose roles areBDR
andASM
, enterrole
for theattribute
parameter and["BDR","ASM"]
for thevalues
parameter.
- In
- Make sure the value of the
code
parameter insuggestions
is the same as the value of thecode
parameter of the suggestion itself. - Save your changes.
What to do next
Now that the suggestion rules are in place, you can do these things:
- Specify the order in which suggestions are displayed. See Specifying the display order.
- Upload the actual suggestions that must be displayed on people's devices. See Uploading suggestions in bulk.
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.
To specify the order of display:
- Log in to the Vymo web app.
- Click Customize > Global Settings > JSON Configurations.
- Locate the
clientSuggestionConfig
object, and expandprioritizationConfig
. - In the
valueConfigList
object, specify the weights for the suggestions. For example, in the following code snippet, the suggestions from the module calledcross-sell_opportunities
are displayed before those fromagents_agency
. For an explanation of the parameters, see theclientSuggestionConfig
object."valueConfigList": [ { "weight": 30, "module": "cross-sell_opportunities" }, { "weight": 10, "module": "agents_agency" } ]
- 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 |
|
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 insuggestions
(line 68 in this example) is the same as the value of thecode
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 |
|
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 insuggestions
(line 68 in this example) is the same as the value of thecode
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 |
|
See also
- Suggestions reference
- The
clientSuggestionConfig
object - The
rules
object - The
moduleSuggestionConfig
object