How Social Proof Experience Output API Works
The Social Proof Experience Output API (spMessages API) works by leveraging pre-configured setups to decide which social proof messages should be displayed for a given variation. It allows users to define how these messages will appear based on specific criteria, such as context, segment, and thresholds, ensuring the appropriate message is shown dynamically based on user interactions and predefined rules.
Key functionalities include:
-
The API focuses on active social proof experiences, either currently active or evergreen.
-
The importance of the experience is crucial when multiple conflicting experiences exist in a given context. The API addresses the following scenarios:
-
It automatically selects the experience with the highest importance when multiple experiences share the same location selector.
-
If the location selector is null, the API chooses the highest importance experience and include it in the response.
-
If both the location selector and importance are the same across multiple experiences, the API randomly selects one of the messages to display.
-
-
The API identifies the correct experience or variation based on context and segment parameters passed from the API call.
-
It identifies the threshold based on the user count or event count parameter from the message text.
-
It identifies the event count or user count through the social proof API for the given product and identify the final text to be shown.
-
When the “Display Multiple Messages” option is enabled or disabled:
-
If the ''Display Multiple Messages'' option is enabled, the API identifies all messages meeting the threshold and includes all of them in the response. This response consists of:
-
Message text, priority, and display interval
-
Event count/User count based on what is defined in the text.
OR
-
-
If the ''Display Multiple Messages'' option is disabled (single message scenario), the API identifies the highest priority message that meets the defined threshold and includes it in the response. This response consists of:
-
Message text
-
Event count/User count based on what is defined in the text.
-
-
-
Multiple message types can be selected for category and list pages.
-
For category and list page templates, multiple product IDs can be passed. However, multiple messages cannot be provided for a single product when multiple products are passed. It is a limitation of social proof API.
For more information about setting up the social proof experience, refer to Social Proof User Guide.
The following parameters are optional and can also be supported and passed to the API endpoint:
Name | Required or Optional | Description |
---|---|---|
cn | Optional |
Category Name that are currently being viewed, ready to display to the user. |
cv |
Optional |
Cart value. Used for targeted campaigns involving cart value. It's expressed in cents; for example, $10 is represented as 1000. Example: cv=9550 (this would equal to 95.50) |
categoryData |
Optional |
Omits category data (categoryIds and categories) when set to false. The default is true. Example: categoryData=false |
pref |
Optional |
Referring page’s URL, may exist on every page. Shopper’s referrer prior to viewing the page. Used for reporting and merchandising. This is highly recommended. Example: pref=http://www.google.com |
recentlyPurchased |
Optional | Products the shopper has purchased in the current session. This can be a single product ID or list of product IDs. Products listed here will be considered along with historical data from the Algonomy system. Use the pipe "|" character to separate the product IDs. Example: recentlyPurchased=uv2345|xt1234 |
userAttribute |
Optional |
Custom keys and values that describe the current customer. Separate information using a semicolon and the pipe "|" character. Example: userAttribute=eye_color:blue;green|hair_color:brown |
atcid |
Optional |
Add to cart ID. This can be a single product ID or a list of product IDs. If more than one product is added to the cart, separate the product IDs by using the pipe "|" character. Example: atcid=uv2345|xt1234 |
attribute |
Optional |
Product attribute |