cancel
Showing results for 
Search instead for 
Did you mean: 

Unit of quantity in API_MKT_INTERACTION_SRV

CNiehaves
Explorer
0 Kudos

Hello,
we are using the API_MKT_INTERACTION_SRV service to upload interactions into SAP Marketing Cloud.

Sample JSON:

--batch
content-type:multipart/mixed; boundary=changeset_1

--changeset_1
content-type: application/http
content-transfer-encoding: binary

POST Interactions HTTP/1.1
Content-Length: 1035
Accept: application/json
Content-Type: application/json

{
"InteractionContactOrigin":"PORTAL",
"InteractionContactId":"1000058",
"CommunicationMedium":"ONLINE_SHOP",
"InteractionType":"SHOP_ITEM_VIEW",
"InteractionTimeStampUTC":"2018-10-01T08:31:51",
"MarketingArea":"GLOB",
"InteractionAmount": "0",
"InteractionCurrency": "EUR",
"InteractionStatus": "03",
"DeviceType": "DESKTOP",
"InteractionReason": "",
"InteractionProducts":
[
	{
	"ProductOrigin":"ECOMMERCE",
	"Product":"2000001",
	"InteractionProductAmount":"0",
	"InteractionProductQuantity":"2",
	"InteractionProductUnit":"m"	
	}
]
}

--changeset_1--
--batch--

The creation works fine and the interaction was created without any errors but the unit of quantity (InteractionProductUnit) is only displayed as "***":

I tried different units without success.

Which are the possible units or is there any possibility to customize own units? I didn't find a customizing entry for this in the App "Manage Your Solution".

Thank you in advance and best regards,
Christian

Accepted Solutions (1)

Accepted Solutions (1)

CNiehaves
Explorer
0 Kudos

Hi Saurabh,
i found the solution. The field "InteractionProductUnit" is case sensitive.

With the following JSON it worked fine:

--batch
content-type:multipart/mixed; boundary=changeset_1

--changeset_1
content-type: application/http
content-transfer-encoding: binary

POST Interactions HTTP/1.1
Content-Length: 1035
Accept: application/json
Content-Type: application/json

{
"InteractionContactOrigin":"PORTAL",
"InteractionContactId":"1000058",
"CommunicationMedium":"ONLINE_SHOP",
"InteractionType":"SHOP_ITEM_VIEW",
"InteractionTimeStampUTC":"2018-10-01T08:31:51",
"MarketingArea":"GLOB",
"InteractionAmount": "0",
"InteractionCurrency": "EUR",
"InteractionStatus": "03",
"DeviceType": "DESKTOP",
"InteractionReason": "",
"InteractionProducts":
[
	{
	"ProductOrigin":"ECOMMERCE",
	"Product":"2000001",
	"InteractionProductAmount":"0",
	"InteractionProductQuantity":"2",
	"InteractionProductUnit":"PC"	
	}
]
}

--changeset_1--
--batch--

Best regards,
Christian

Answers (1)

Answers (1)

former_member226
Employee
Employee

Hi Christian,

Make sure you are passing a valid code for unit of measurement fields "InteractionProductUnit". Unfortunately I couldn't find any specific service or place in cloud which can give a list of allowed code. Since we also have a onprem edition so i just pass the standard ISO codes for Unit of measurement and it always works. Also you can read the product data from API and see what is the UOM maintained against same.

Just a workaround, If you already have product loaded in marketing cloud try to skip InteractionProductUnit in interaction payload. in our experience in such case it picks the value from product root data.

Thanks

Saurabh