SAP Knowledge Base Article - Public

3058417 - SAP Marketing Cloud - Commerce interaction import failing due to malformed API payloads

Symptom

After SAP Marketing Cloud upgrade to Release 2105, no more interactions are imported from SAP Commerce. Interaction imports via CPI using API API_MKT_INTERACTION_SRV or CUAN_BUSINESS_DOCUMENT_IMP_SRV $batch requests are failing with the following error message:

The Data Services Request could not be understood due to malformed syntax

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.

Environment

SAP Marketing Cloud

Reproducing the Issue

  1. Create and save any shopping cart or sales order interaction in SAP Commerce
  2. Observe that the interaction is not synchronized to SAP Marketing Cloud

Cause

The issue happens for $batch requests for odata API API_MKT_INTERACTION_SRV and odata service CUAN_BUSINESS_DOCUMENT_IMP_SRV and is caused from wrongly malformed payload syntax in the requests:

  • /sap/opu/odata/sap/API_MKT_INTERACTION_SRV/$batch
    The request contains a wrong colon (':' character) for the POST Interactions entity set

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

  • /sap/opu/odata/sap/CUAN_BUSINESS_DOCUMENT_IMP_SRV/$batch
    The request contains a wrong colon (':' character) for the POST  ImportHeaders entity set

POST ImportHeaders HTTP/1.1
Content-Length: 2010
:
Accept: application/json
Content-Type: application/json

The issue happens after SAP Marketing Cloud got updated to Release 2105 - with Release 2105 the gateway inside SMC got more restrictive and rejects those payloads.

Resolution

Check the input payload for the OData adapter in the integration flow in CPI. The issue is caused by the presence of empty header elements such as the following:

<headers>
  <header>
    <headerName></headerName>
    <headerValue></headerValue>
  </header>
</headers>

Please remove the empty header tags from the payload in the previous step.

From a standard integration content perspective, the issue is solved with the latest integration package 'SAP Commerce Cloud Integration with SAP Marketing Cloud' version 1.1.6.

See Also

Further information about the latest version of the integration package is available in the API Business Hub:

SAP Commerce Cloud Integration with SAP Marketing Cloud

Keywords

SMC, CPI, Commerce, API_MKT_INTERACTION_SRV, CUAN_BUSINESS_DOCUMENT_IMP_SRV, $batch
The Data Services Request could not be understood due to malformed syntax , KBA , CEC-MKT-INT-COM , SAP Marketing Integration with Commerce , CEC-MKT-OFM , Offer Management , CEC-MKT-DM-IA , Interaction , Problem

Product

SAP S/4HANA Cloud all versions