Personalize API Flow execution
You can use the Personalize REST API flow execution service to run a flow for an experiment or experience. You can do this over any web-based or mobile application, so you can personalize dynamic offers or content in real-time. For example, you can nudge the guest onto the next page or encourage them to add a product to their cart or order.
Characteristics of the flow execution service:
-
Facilitates personalization in experiences and experiments, including interactive and web
-
Invokes real-time responses
-
Supports using decision models in interactive experiments to return the next best offer or action
You can send a flow execution request using either the browserId
, email
, or identifiers
attribute. This flexibility is particularly useful when interacting with guests who have never been identified online and do not have a browserId
attribute. You can use the email
or identifiers
attribute to execute a flow that uses a decision model to return the next best offer or action.
You can also send a flow execution request for an experiment or experience when you want to send the output of the decision model in real-time to an external system such as a marketing cloud. The browserId
attribute is not relevant or captured by this type of external system, so we recommend using the email
or identifiers
attribute to execute the flow.
The following table describes flow execution model attributes:
Attribute |
Type |
Description |
Example(s) |
---|---|---|---|
|
string |
The client key retrieved from Sitecore Personalize. |
|
|
string (uppercase) |
The channel captured on each page the guest visited. |
|
|
string (2 letter ISO 639 language code) |
The language captured on each page the guest visited. |
|
|
3 letter ISO 4217 |
Your organization’s currency code. |
|
|
string (predefined by your organization) |
The point of sale used. |
|
|
string |
The ID of a browser generated by Sitecore Personalize. |
|
|
string |
The guest's email address. |
|
|
JSON object |
The unique identifiers of the guest. |
N/A |
|
JSON object |
The parameters returned from the visitor's current URL. |
N/A |
The following table describes identifiers
object attributes:
Attribute |
Description |
Type |
Example(s) |
---|---|---|---|
|
The identifier provider. |
string |
|
|
The identifier identification. |
string |
|
The following table describes params
object attributes:
Attribute |
Description |
Type |
Example(s) |
---|---|---|---|
|
The UTM campaign parameter included in the visitor's current URL. |
string |
|
|
The UTM source included in the visitor's current URL. |
string |
|
|
The UTM medium included in the visitor's current URL. |
string |
|
|
The UTM content included in the visitor's current URL. |
string |
|
The friendlyID
You can programmatically run experiments and experiences using the friendlyID
attribute. When you create an experiment or experience, Sitecore Personalize automatically creates an ID when you name the experiment or experience. For example, if you name an experiment Product Recommender, Sitecore Personalize automatically generates an ID named product_recommender
.
In some organizations there might be several variations of an experiment named Product Recommender that have different page targets, audience filters, or other conditions that must be met in order for the experiment to run.
To use this same example, users might intentionally delete some of the experiments named Product Recommender after the marketing campaign is retired. This can often happen across regions. To support referential integrity, Sitecore Personalize automatically appends a numeral to the value of the friendlyID
attribute if the name of the experiment you create is identical to any names of deleted experiments. For example, Sitecore Personalize automatically appends a numeral 2 so the friendlyID
attribute value is product_recommender_2
.
To apply fuzzy matching so that Sitecore Personalize executes the first lexicographical match of the friendlyId
, you pass in product_recommender*
as the value for the friendlyID
attribute. You can use an asterix to apply lexicographical order and execute the first live experment that matches and passes any other conditions such as page targeting and real-time audience filters.