applyResponse
The applyResponse
command allows you to perform various actions based on a response from the Edge Network. It is typically used in hybrid deployments where the server makes an initial call to the Edge Network. This command takes the response from that call and initializes the Web SDK in the browser.
Apply response using the Web SDK tag extension
Applying responses is performed as an action within a rule in the Adobe Experience Platform Data Collection tags interface.
- Log in to experience.adobe.com using your Adobe ID credentials.
- Navigate to Data Collection > Tags.
- Select the desired tag property.
- Navigate to Rules, then select the desired rule.
- Under Actions, select an existing action or create an action.
- Set the Extension dropdown field to Adobe Experience Platform Web SDK, and set the Action Type to Apply response.
- Set the desired fields on the right.
- Click Keep Changes, then run your publishing workflow.
Apply response using the Web SDK JavaScript library
Run the applyResponse
command when calling your configured instance of the Web SDK. The object containing configuration options supports the following fields:
renderDecisions
: A boolean that forces the Web SDK to render any personalized content that is eligible for automatic rendering. Identical torenderDecisions
in thesendEvent
command.responseHeaders
: A map of string header names to string header values.responseBody
: Required. A JSON response body from the server call to the Edge Network.personalization.sendDisplayEvent
: A boolean that operates identically topersonalization.sendDisplayEvent
in thesendEvent
command.
alloy("applyResponse",{
"renderDecisions": true,
"responseHeaders": {},
"responseBody": {},
"personalization": {
"sendDisplayEvent": true
}
});
Response object
If you decide to handle responses with this command, the following properties are available in the response object:
propositions
: An array of propositions returned by the Edge Network. Propositions that are automatically rendered include the flagrenderAttempted
set totrue
.inferences
: An array of inference objects, which contain machine learning information about this user.destinations
: An array of destination objects returned by the Edge Network.
recommendation-more-help
ad108910-6329-42f1-aa1d-5920a2b13636