Skip to Content
Feb 18, 2019 at 09:59 PM

How to Resolve "Fewer Than 2 IDs Provided" Error For MarketingPermissions oData Requests


Hello experts,

I am trying to resolve a Marketing Permissions issue involving an oData call to the API_MKT_CONTACT_SRV service for setting Contact Permission values. Before contacting you I've read through the SAP Integration Guide for Contacts and Johnannes Hirling's "How to Import Contact Data via OData Services..." post, which provides an example of this in the Entity Path – MarketingPermissions section.

So we have code in an iflow that produces the following batch request that's equivalent to Johannes's example, just in XML instead of JSON format. To elaborate, our batchParts request is used for updating the ContactPermission value from 'N' to 'Y' and is structured like this:

<?xml version="1.0" encoding="UTF-8"?>

The oData configuration within the iflow looks like this:

Address:  https://<myservername> Details:  Update(PUT)Resource Path: MarketingPermissions('ContactID','ContactPermissionID','ContactPermissionOrigin','MarketingArea','CommunicationMedium','CommunicationCategory')Fields: PermissionSourceCommMedium,PermissionIsExplicit,PermissionUTCDateTime,ContactID,ContactPermissionID,ContactPermissionOrigin,MarketingArea,CommunicationMedium,CommunicationCategory

It's also worth noting that the corresponding Contact record has already been created via a prior step in the iflow, so we're using the http PUT method here to simply update the ContactPermission value of the MarketingPermission segment for the given Contact.

Anyway after the iflow code is executed, I'm not seeing that the ContactPermission value is changed. After some looking I noticed the error "Fewer Than 2 IDs Provided" is appearing in Import Monitor app for all of my test requests. Here's an example of the failed data record as it appears in the Import Monitor notification pane:

IA_TIMESTAMP: 20190101091500.0
mp-get-responsexml.txtIC_TYPE: 00

Not sure what additional IDs are needed to perform the Marketing Permissions update outside of the ones listed in the SAP Integration Guide for Contacts, which are also listed in the Resource Path above. I am able to see the underlying ContactOriginData record(s) already created in the Contacts step by running the following GET request in POSTMAN:;v=0002/ContactOriginData(ContactID='',ContactOrigin='BOSCHTOOLS_WEBSITE')/MarketingPermissions?$filter=ContactPermissionID eq '' and CommunicationMedium eq 'EMAIL'&$orderby=PermissionUTCDateTime desc

(Curiously, two Marketing Permission records were created via a single Contacts PUT request, which differ by ContactPermissionOrigin value. I'll attach the actual response message to this question.)

Please let me know what other information I can provide in order for you to offer some insight, suggestions, or additional reading to solve this problem.

Thank you!

John Kormanec