cancel
Showing results for 
Search instead for 
Did you mean: 

Odata Patch operation for marketing cloud API_MKT_INTERACTION_SRV failed

Lorr
Explorer
0 Kudos

Hi Experts

Need your help in resolving the error we are facing while updating existing interactions for the marketing cloud for the ODATA service "API_MKT_INTERACTION_SRV".

In cpi we are using the odata adapter v2 with patch operation for updating particular contact based on the InteractionUUID

However in cpi it is erroring out with the following messasge .

"org.apache.camel.CamelExchangeException: Parallel processing failed for number 0. Exchange[ID-vsa7921837-37444-1607148755890-172-4]. Caused by: [org.apache.camel.CamelExchangeException - Sequential processing failed for number 0. Exchange[ID-vsa7921837-37444-1607148755890-172-10]. Caused by: [org.apache.olingo.odata2.api.uri.UriSyntaxException - Unknown literal: '[2864c952-1b24-3a53-1700-f6fa7c27db74]'.]], cause: org.apache.olingo.odata2.api.edm.EdmLiteralException: Unknown literal: '2864c952-1b24-3a53-1700-f6fa7c27db74'."


We have used a GET call to get existing interaction record so the UUID is correct and in the right format

The EDMX file has just been refreshed again so we know that is up-to date and it is the correct one being used in the mapping step.

I certain the issue is with passing the UUID as the key for the PATCH (non batch) method, however I have folowwed all guide I can find and I can't resolve this issue.

Any help is greatly appreciated.

L

Accepted Solutions (1)

Accepted Solutions (1)

former_member226
Employee
Employee

Hello,

It looks like you have already identified the issue 🙂 Mostly issue is due to incorrect data element (more precisely UUID ) being passed as the key. In order to confirm the same please put the iflow in Trace mode and then check the failed message to confirm what URL is being called from HTTP/OData Adpater.

Based on my wild understanding from the message above, it looks like you are processing an array to store Interaction UUID and when you pass the UUID to PATCH method then following happens:

System Expectes: Interactions(InteractionUUID=guid'2864c952-1b24-3a53-1700-f6fa7c27db74')

Your CPI passes: Interactions(InteractionUUID=guid'[2864c952-1b24-3a53-1700-f6fa7c27db74]')

If that's the case then you might need to convert the array element to string using index. For ex: UUID[0]

Lorr
Explorer
0 Kudos

Hi Saurabh,

Unfortunately this did not work for us As the parameter appears to getting passed in as standard (and not something we are setting in the iflow) trying to attached any type of index results in an "Invalid key predicate" error.:

Looking at the trace it looks like it is being passed in the setHeader part of the call:

This does not appear to be a header variable we are able to influence as we have tried may different ways as the value we try and set is never being passed through and is simply ignored.

Any further guidance would be greatly appreciated.

L.

former_member226
Employee
Employee
0 Kudos

Hello,

Why are you passing "InteractionUUID[0]" in the URL? This is wrong. You need to use "InteractionUUID" (without [0] , snapshot attached error.png) because in such case the system will not find InteractionUUID[0] as the field and will ultimately throw an error for URL syntax.

Further, I see a very different view of the trace mode when you call the URL therefore i am not sure if you are tracing the right way or not. I will also recommend in parallel to open an SAP ticket for support to check if they can help you as they might have the system access.

Lorr
Explorer

SAP have confirmed there is an issues with the API where it is not handling alpha numeric values being passed as the GUID.

Answers (1)

Answers (1)

mariuseigl
Discoverer

Hello,

i have facing the same issue with S/4 Custom Bussiness Object OData Services. My solution was to define the UUID direct in the OData URL Path like:

PATCH CustomBOName(SAP_UUID=guid'uuid')

Regards,

Marius

_Konstantin_
Participant
0 Kudos

marius.eigl Thank you! Your tip helped a lot 🙂