on 2019 Jul 12 1:35 PM
Hi All,
In SAP Marketing cloud , i am trying to create a interaction with product details. When i am passing only the product id then the interaction is created with the product category details. When i try to pass the product category as one field then i am getting the invalid value error.
Sample payload. Check and confirm if i need to send any other data
{
"InteractionContactOrigin":"Zxxxxx",
"InteractionContactId":"239",
"InteractionType":"SHOP_ITEM_VIEW",
"CommunicationMedium":"ZONLINE_WEBSITE_xxxx",
"InteractionSourceDataURL":"https://www.abcdefg.com",
"InteractionSourceObjectType":"WEB_SESSION",
"InteractionSourceObject":"1831425",
"InteractionTimeStampUTC":"2019-07-02T12:00:00",
"MarketingArea":"xxxx",
"SourceSystemType":"xxxxxx",
"InteractionProducts":[{
"ProductOrigin":"xxxxxxx",
"Product":"xxxxxx"
}],
"InteractionProductCategories":[{
"ProductCategory":"xxxxxxx"
}]
}
Request clarification before answering.
Hi,
While adding "ProductCategory" to the payload you have to also pass "ProductCategoryHierarchy" as well mandatorily and both are case sensitive. if you just pass ProductCategory then system is unable to identify the hierarchy it belongs to hence the error you get in response.
Pls refer the sample payload to be used:
{
"InteractionContactOrigin": "EMAIL",
"InteractionContactId": "xxxxxx@xxx.com",
"InteractionTimeStampUTC": "2019-07-11T09:41:50",
"InteractionSourceObjectType": "ERP",
"InteractionSourceObject": "12345678",
"CommunicationMedium": "ONLINE_SHOP",
"InteractionType": "SHOP_ITEM_VIEW",
"InteractionCurrency":"EUR",
"InteractionProductCategories":[{
"ProductCategory":"HARDWARE",
"ProductCategoryHierarchy":"root"
}],
"InteractionProducts": [
{
"ProductOrigin": "SAP_HYBRIS_PRODUCT",
"Product": "478828",
"InteractionProductAmount": "99.99",
"InteractionProductQuantity": "1",
"InteractionProductUnit": "m"
},
{
"ProductOrigin": "SAP_HYBRIS_PRODUCT",
"Product": "478332",
"InteractionProductAmount": "99.99",
"InteractionProductQuantity": "1",
"InteractionProductUnit": "m"
}
]
}
Thanks
Saurabh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Selvam,
Please check the detailed explanation of how to use the Marketing Product API.
You can adjust your OData call accordingly.
Kind Regards,
Kunal Bansal
SAP Marketing Cloud, Consultant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.