Suggestions are built on top of rules. Each rule is of a pre-defined activity type, and contains several parameters that are described on this page.
Rule types
Rule types are the framework to use when creating rules suggestions. The following table lists the standard rule types. Example code for these rule types are further down the page.
Rule type
When to use
Rule category
lastActivity
For suggesting the next best course of action
Suggestion rule binding
managerParticipant
For activities where managers are participants
Suggestion rule binding
activityScheduled
For sending reminders
Suggestion rule binding
activityFrequency
For counting the number of times an activity is done
Suggestion rule binding
voAttribute
For suggestions based on any of the module or user attributes
Filter rule binding
voModule
For suggestions that must refer to a specific module
Filter rule binding
voState
For suggesting the next best course of action when the state of record changes
Filter rule binding
voCreatedDate
For suggestions based on record age
Filter rule binding
voLastUpdateDate
For suggestions based on record age
Filter rule binding
voMeetingDate
For reminders
Filter rule binding
userTeamFilter
Filter rule binding
composite
For using more than one rule in a single rule
A composite rule can contain rules of only one category, either Suggestion Rule Binding or Filter Rule Binding.
IN, for suggestions that work on the presence of a value in a list; for example, if a record is generated during a specific campaign
NOT_IN, for suggestions that work if a value is absent in a list; for example, if a record isn't in a specific state.
IS_EMPTY, for suggestions that work when a null list is returned by a rule; for example, if no meetings are scheduled for a specific day.
IS_NOT_EMPTY, for suggestions that work when a list isn't empty; for example, if the created date for a record is equal to today.
Frequency operators
AT_LEAST, which evaluates to greater than or equal to
MORE_THAN, which evaluates to greater than
AT_MOST, which evaluates to less than or equal to
LESS_THAN, which evaluates to less than or equal to
EXACTLY, which evaluates to equal to
Time comparators
Time value
Description
WITHIN
Time in the past, relative to today, including today, without any time gap
IN_LAST
Time in the past, relative to today, excluding today, without any time gap
BEFORE
Time in the past, relative to today, including the specified time gap
AFTER
Time in the future, relative to today, without any time gap
BETWEEN
Time between a start date and an end date
ON
Exactly on the specified date
For the BETWEEN comparator, the inputParams parameter of the rule object contains two values, one each for the start date and end date. For all of the other time comparators, only one date is needed.
ASSIGNEE_MANAGER, for the person and their manager
ASSIGNEE_MANAGER_HIERARCHY, for the person, their manager, and the entire reporting hierarchy of that person
GROUP_HIERARCHY
Example configuration for rule types
Each rule type its own JSON structure. The highlighted lines in Rule skeleton show the bits that you must change when you copy the code when creating a rule. The highlighted lines in Suggestion example shows how the rule gets applied in suggestionSets.
lastActivity
The highlighted lines in Rule skeleton show the bits that you must change when you copy the code when creating a rule in rules. The highlighted lines in Suggestion example shows how the rule gets applied in suggestionSets at the global or module levels.
The highlighted lines in Rule skeleton show the bits that you must change when you copy the code when creating a rule in rules. The highlighted lines in Suggestion example shows how the rule gets applied in suggestionSets at the global or module levels.
{...tobedone...}
{...tobedone...}
activityScheduled
The highlighted lines in Rule skeleton show the bits that you must change when you copy the code when creating a rule in rules. The highlighted lines in Suggestion example shows how the rule gets applied in suggestionSets at the global or module levels.
The highlighted lines in Rule skeleton show the bits that you must change when you copy the code when creating a rule in rules. The highlighted lines in Suggestion example shows how the rule gets applied in suggestionSets at the global or module levels.
The highlighted lines in Rule skeleton show the bits that you must change when you copy the code when creating a rule in rules. The highlighted lines in Suggestion example shows how the rule gets applied in suggestionSets at the global or module levels.
{"code":"campaigns_nudge","deleted":false,"suggestionType":"LEADS","suggestionSchedule":"BOD","suggestionSetDismissDuration":720,"userSelectionCriteria":{"userRole":"ASSIGNEE","userAttributeFilters":[{"disabled":false,"order":null,"attribute":"role","values":["BDR","SM"]}]},"filterRuleBindings":[{"rule":"voCampaignContains","ruleInputBindings":[{"type":"value","param":"voAttributeList","value":"[\"diwali_dhamaka\"]"}],"ruleOutputBindings":[{"type":"variable","param":"vos","variable":"vo_code_list","dimension":null}]}],"suggestions":[{"suggestionDisplay":{"title":"Meet these { {actualLastUpdateStateTypeName} } { { {voModuleName} } } scheduled for today","subTitle":"Follow up on these { { {voModuleName} } } today.","message":"{ {voName} } and others","ctaMappings":[{"disabled":false,"order":null,"code":"Leads","inputBindings":null,"ctaType":null}]},"ruleBinding":null,"name":"Suggestion for leads generated during Diwali2021","order":0,"code":"suggestion_for_leads_generated_during_Diwali2021","suggestionEnabled":true,"templateCode":null,"experimentTags":null}]}
voModule
The highlighted lines in Rule skeleton show the bits that you must change when you copy the code when creating a rule in rules. The highlighted lines in Suggestion example shows how the rule gets applied in suggestionSets at the global or module levels.
123
{...}
123
{...tobedone...}
voState
The highlighted lines in Rule skeleton show the bits that you must change when you copy the code when creating a rule in rules. The highlighted lines in Suggestion example shows how the rule gets applied in suggestionSets at the global or module levels.
The highlighted lines in Rule skeleton show the bits that you must change when you copy the code when creating a rule in rules. The highlighted lines in Suggestion example shows how the rule gets applied in suggestionSets at the global or module levels.
The highlighted lines in Rule skeleton show the bits that you must change when you copy the code when creating a rule in rules. The highlighted lines in Suggestion example shows how the rule gets applied in suggestionSets at the global or module levels.
The highlighted lines in Rule skeleton show the bits that you must change when you copy the code when creating a rule in rules. The highlighted lines in Suggestion example shows how the rule gets applied in suggestionSets at the global or module levels.
The highlighted lines in Rule skeleton show the bits that you must change when you copy the code when creating a rule in rules. The highlighted lines in Suggestion example shows how the rule gets applied in suggestionSets at the global or module levels.
The highlighted lines in Rule skeleton show the bits that you must change when you copy the code when creating a rule in rules. The highlighted lines in Suggestion example shows how the rule gets applied in suggestionSets at the global or module levels.
Lines from 5 through 52 contain the inputParams of all of the rules that go into this composite rule.
{"type":"composite","code":"this_is_where_you_give_the_rule_a_name","deleted":false,"inputParams":[{"disabled":false,"order":null,"param":"activityVarA","variableType":"task_name","multi":false,"required":true},{"disabled":false,"order":null,"param":"durationVarA","variableType":"duration","multi":false,"required":true},{"disabled":false,"order":null,"param":"frequencyVarA","variableType":"frequency","multi":false,"required":true},{"disabled":false,"order":null,"param":"activityVarB","variableType":"task_name","multi":false,"required":true},{"disabled":false,"order":null,"param":"durationVarB","variableType":"duration","multi":false,"required":false},{"disabled":false,"order":null,"param":"frequencyVarB","variableType":"frequency","multi":false,"required":true}],"outputParams":[{"disabled":false,"order":null,"param":"vos","variableType":"vo_code","multi":true,"required":true}],"evaluate":"name_of_one_rule AND name_of_another_rule","dependentRules":[{"rule":"name_of_one_rule","ruleInputBindings":[{"type":"variable","param":"activityVar","variable":"activityVarA","dimension":null},{"type":"variable","param":"durationVar","variable":"durationVarA","dimension":null},{"type":"variable","param":"frequencyVar","variable":"frequencyVarA","dimension":null}],"ruleOutputBindings":[{"type":"variable","param":"vos","variable":"vo_code_list","dimension":null}],"name":"give_a_name_to_this_dependent_rule"},{"rule":"name_of_another_rule","ruleInputBindings":[{"type":"variable","param":"activityVar","variable":"activityVarB","dimension":null},{"type":"variable","param":"durationVar","variable":"durationVarB","dimension":null},{"type":"variable","param":"frequencyVar","variable":"frequencyVarB","dimension":null}],"ruleOutputBindings":[{"type":"variable","param":"vos","variable":"vo_code_list","dimension":null}],"name":"give_a_name_to_this_dependent_rule"}]}