Deliver offers using the Decisioning API decisioning-api
With Decision Management, you can create and deliver end-user personalized offer experiences, across channels and applications using business logic and decision rules. An offer is a marketing message that may have rules associated with it that specify who is eligible to see the offer.
You can create and deliver offers by making a POST request to the Decisioning API.
This tutorial requires a working understanding of APIs, specifically with regards to Decision Management. For more information, see the Decision Management API developer guide. This tutorial also requires that you have a unique placement ID and decision ID value available. If you have not acquired these values, see the tutorials for creating a placement and creating a decision.
➡️ Discover this feature in video
Required headers required-headers
The following table shows the valid values which comprise the Content-Type and Accept fields in the request header:
application/vnd.adobe.xdm+json; schema="https://ns.adobe.com/experience/offer-management/decision-response;version=1.0"
application/vnd.adobe.xdm+json; schema="https://ns.adobe.com/experience/offer-management/decision-request;version=1.0"
Bearer {ACCESS_TOKEN}
{IMS_ORG}
{SANDBOX_NAME}
{API_KEY}
- All requests that contain a payload (POST,PUT,PATCH) require the content-type header
API request request
API format
POST /{ENDPOINT_PATH}/decisions
{ENDPOINT_PATH}
https://platform.adobe.io/data/core/ods
Request
curl -X POST \
'https://platform.adobe.io/data/core/ods/decisions' \
-H 'Accept: application/vnd.adobe.xdm+json; schema="https://ns.adobe.com/experience/offer-management/decision-response;version=1.0"' \
-H 'Content-Type: application/vnd.adobe.xdm+json; schema="https://ns.adobe.com/experience/offer-management/decision-request;version=1.0"'
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {IMS_ORG}' \
-H 'x-sandbox-name: {SANDBOX_NAME}'
-d '{
"xdm:propositionRequests": [
{
"xdm:placementId": "xcore:offer-placement:ffed0456",
"xdm:activityId": "xcore:offer-activity:ffed0123",
"xdm:itemCount": 2
},
{
"xdm:placementId": "xcore:offer-placement:ffed0012",
"xdm:activityId": "xcore:offer-activity:fffc0789"
}
],
"xdm:profiles": [
{
"xdm:identityMap": {
"SWCUSTID": [
{
"xdm:id": "123@abc.com"
}
]
},
"xdm:decisionRequestId": "0AA00002-0000-1224-c0de-cjf98Csj43"
}
],
"xdm:allowDuplicatePropositions": {
"xdm:acrossActivities": true,
"xdm:acrossPlacements": true
},
"xdm:mergePolicy": {
"xdm:id": "5f3ed32f-eaf1-456c-b0f0-7b338c4cb18a"
},
"xdm:responseFormat": {
"xdm:includeContent": true,
"xdm:includeMetadata": {
"xdm:activity": [
"name"
],
"xdm:option": [
"name"
],
"xdm:placement": [
"name"
]
}
}
}'
xdm:propositionRequests
xdm:propositionRequests.xdm:placementId
"xdm:placementId": "xcore:offer-placement:ffed0456"
xdm:propositionRequests.xdm:activityId
"xdm:activityId": "xcore:offer-activity:ffed0123"
xdm:itemCount
"xdm:itemCount": 2
xdm:profiles
xdm:profiles.xdm:identityMap
Email: [{"xdm:id": "123@abc.com"}]
xdm:profiles.xdm:decisionRequestId
"xdm:decisionRequestId": "0AA00002-0000-1224-c0de-cjf98Csj43"
xdm:allowDuplicatePropositions
xdm:allowDuplicatePropositions.xdm:acrossActivities
"xdm:acrossActivities": true
xdm:allowDuplicatePropositions.xdm:acrossPlacements
"xdm:acrossPlacements": true
xdm:mergePolicy.xdm:id
"xdm:id": "5f3ed32f-eaf1-456c-b0f0-7b338c4cb18a"
xdm:responseFormat
xdm:responseFormat.xdm:includeContent
true
, includes content to the response."xdm:includeContent": true
xdm:responseFormat.xdm:includeMetadata
xdm:id
and repo:etag
are returned by default.name
xdm:responseFormat.xdm:activity
xdm:activity
.name
xdm:responseFormat.xdm:option
xdm:option
.name
, characteristics
xdm:responseFormat.xdm:placement
xdm:placement
.name
, channel
, componentType
Response
A successful response returns information on your proposition, including its unique xdm:propositionId
.
{
"xdm:propositionId": "5d0ffb5e-dfc6-4280-99b6-0bf3131cb8b8",
"xdm:propositions": [
{
"xdm:activity": {
"xdm:id": "xcore:activity:ffed0123",
"repo:etag": 4
},
"xdm:placement": {
"xdm:id": "xcore:placement:ffed0456",
"repo:etag": 1
},
"xdm:options": [
{
"xdm:id": "xcore:personalized-option:ccc0111",
"repo:etag": 3,
"@type": "https://ns.adobe.com/experience/decisioning/content-component-html-template",
"xdm:content": "<html>some html</html>"
},
{
"xdm:id": "xcore:personalized-option:ccc0222",
"repo:etag": 5,
"@type": "https://ns.adobe.com/experience/decisioning/content-component-html-template",
"xdm:content": "<html>hello, world</html>",
"xdm:score": 45.65
}
]
},
{
"xdm:activity": {
"xdm:id": "xcore:activity:ffed0123",
"repo:etag": 4
},
"xdm:placement": {
"xdm:id": "xcore:placement:ffed0789",
"repo:etag": 2
},
"xdm:fallback": {
"xdm:id": "xcore:fallback:ccc0222",
"repo:etag": 5,
"@type": "https://ns.adobe.com/experience/decisioning/content-component-imagelink",
"dc:format": "image/png",
"xdm:deliveryURL": "https://cdn.adobe.com/content/1445323-1134331.png",
"xdm:content": "https://www.adobe.com/index2.html"
}
}
],
"ode:createDate": 1566497582038
}
xdm:propositionId
"xdm:propositionId": "5d0ffb5e-dfc6-4280-99b6-0bf3131cb8b8"
xdm:propositions
options
property or a fallback
property. When present, the options
property cannot be empty.xdm:propositions.xdm:activity
"xdm:id": "xcore:activity:ffed0123"
xdm:propositions.xdm:placement
"xdm:id": "xcore:placement:ffed0456"
xdm:propositions.xdm:options
xdm:id": "xcore:personalized-option:ccc0111
xdm:propositions.xdm:options.@type
@type
acts as the processing contract for the client. When the experience is assembled, the composer will look for the component(s) that have a specific type.https://ns.adobe.com/experience/offer-management/content-component-imagelink
xdm:propositions.xdm:content
text
, html block
, or image link
xdm:score
"xdm:score": 45.65
xdm:propositions.xdm:fallback
"xdm:id": "xcore:fallback:ccc0222"
xdm:propositions.xdm:fallback.dc:format
"dc:format": "image/png"
or "image/jpeg"
xdm:propositions.xdm:fallback.xdm:deliveryURL
https://d37yhxrr0p3l3l.cloudfront.net/0fd0f090-a148-11ea-89e3-f1f2ad52f7e8/urn:aaid:sc:US:a68c86a6-9295-4940-a083-11916b665500/0/40d78a12-f8b6-3f07-8e67-7cb8ae2cc7ec
ode:createDate
"ode:createDate": 1566497582038
Response codes
The table below lists all codes that can be returned in the response:
Next steps next-steps
By following this API guide, you have created and delivered offers using the Decisions API. For more information, see the overview on Decision Management.