建立個人化優惠 create-personalized-offer
個人化優惠是根據適用性規則和限制的可自訂行銷訊息。
您可以向Offer Library API發出POST要求,以建立個人化優惠方案。
Accept和Content-Type標題 accept-and-content-type-headers
下表顯示請求標頭中包含 Content-Type 欄位的有效值:
標題名稱
值
Content-Type
application/json
API格式
POST /{ENDPOINT_PATH}/offers/{ID}?offer-type=personalized
參數
說明
範例
{ENDPOINT_PATH}
持續性API的端點路徑。
https://platform.adobe.io/data/core/dps/
要求
curl -X POST 'https://platform.adobe.io/data/core/dps/offers?offer-type=personalized' \
-H 'Content-Type: application/json' \
-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 '{
"name": "Test personalized offer with frequency constraint",
"status": "draft",
"representations": [
{
"channel": "https://ns.adobe.com/xdm/channel-types/web",
"placement": "offerPlacement1234",
"components": [
{
"type": "html",
"format": "text/html",
"language": [
"en-us"
],
"content": "Hello You qualify for our Discount of 60%"
}
]
}
],
"selectionConstraint": {
"startDate": "2022-07-27T05:00:00.000+00:00",
"endDate": "2023-07-29T05:00:00.000+00:00",
"profileConstraintType": "none"
},
"rank": {
"priority": 0
},
"cappingConstraint": {},
"frequencyCappingConstraints": [
{
"enabled": false,
"limit": 1,
"startDate": "2023-05-15T14:25:49.622+00:00",
"endDate": "2023-05-25T14:25:49.622+00:00",
"scope": "global",
"entity": "offer",
"repeat": {
"enabled": false,
"unit": "month",
"unitCount": 1
}
}
]
}'
回應
成功的回應會傳回新建立的個人化優惠詳細資料,包括id。 您可在後續步驟中使用id
來更新或刪除您的個人化優惠。
{
"etag": 1,
"createdBy": "{CREATED_BY}",
"lastModifiedBy": "{MODIFIED_BY}",
"id": "{ID}",
"sandboxId": "{SANDBOX_ID}",
"createdDate": "2023-05-31T15:09:11.771Z",
"lastModifiedDate": "2023-05-31T15:09:11.771Z",
"createdByClientId": "{CREATED_CLIENT_ID}",
"lastModifiedByClientId": "{MODIFIED_CLIENT_ID}"
}
限制 limitations
行動Experience Edge工作流程目前不支援優惠宣告和某些優惠限制,例如Capping
。 Capping
欄位值會指定某個優惠方案在所有使用者中顯示的次數。 如需詳細資訊,請參閱優惠適用性規則和限制檔案。
recommendation-more-help
b22c9c5d-9208-48f4-b874-1cefb8df4d76