Calling the Engine API
Request Filtering
the model monetate\ decision\ decisionrequest event supports two types of filtering the slots=\[] attribute expects an array of strings, each of which is a slot name for an engine api action (for example, omni redirect ) only actions that have slot names matching one of the specified slots are evaluated, and for each slot the highest priority action matching that slot is returned the actiontypes=\[] attribute expects an array of strings, each of which is an action type for an engine api action (for example, model monetate\ action\ omnichanneljson ) only actions that have an action type matching one of the specified action types are evaluated unlike the slot filters, it's possible to qualify for multiple actions with the same action type if the slots attribute is missing or consists of an empty array, then no slot filtering is performed if the actiontypes attribute is missing or consists of an empty array, then no action type filtering is performed if both slots and actiontypes are specified, then actions must match both the slots and actiontypes filters to be evaluated in this monetate\ decision\ decisionrequest example request, the event considers only omnichannel redirect actions using the slots=\[] approach example monetate\ decision\ decisionrequest request with filtering { "channel" "a 12345678/d/example test", "events" \[ { "eventtype" "monetate\ decision\ decisionrequest", "requestid" "1111111", "slots" \[ "omni redirect" ] }, { "eventtype" "monetate\ context\ pageview", "pagetype" "homepage" } ] } redirect actions when a monetate\ decision\ decisionrequest event that doesn't include slot filtering is submitted, the customer might qualify for redirect actions, non redirect actions, or some combination of the two if the customer qualifies for a redirect action and is assigned to the experiment group, then only that action is returned in the response if the customer qualifies for multiple redirect actions and is assigned to the experiment group for each of them, then the action with the highest priority is returned if the customer doesn't qualify for any redirect actions or is assigned to the control group for all redirect actions they do qualify for, then all non redirect actions are returned single request full page redirects also work when the monetate\ decision\ decisionrequest event includes the attribute managedimpressions=true if the customer qualifies for a redirect action and is assigned to the experiment group, only that action is returned in the response the action includes an impressionid token that should be reported back to monetate when the redirect occurs if the customer qualifies for a redirect action but is assigned to the control group, that redirect action is still included in the response and has an associated impressionid token, but the response indicates that it's a control action with the iscontrol=true flag the impressionid token for a given redirect action must be reported back to monetate regardless of whether the customer is in the experiment group or the control group see managed impressions for details about when and how to report the impressionid token the customer should only be redirected to the url included in the action if iscontrol=false example client side logic # determine whether a redirect action exists among the actions in the response for action in actions if action\['actiontype'] == 'monetate\ action\ omnichannelredirect' \# report the impression regardless of whether the user \# is in the experiment group or control group report impression(action\['impressionid']) \# only redirect if the user is in the experiment group if not action\['iscontrol'] redirect to url(action\['url'])