Skip to Content

Delta mode in OData

Hello,

In the Data Management integration guide https://help.sap.com/http.svc/rc/4d660f95f99b41a3a66283a7dff0e160/1702%20YMKT/en-US/loio339d4f548e6a5176e10000000a4450e5.pdf it is mentioned that you can use IC_UPDATE_MODE to set the update mode to "None", "Full" or "Delta".

However I have the impression this is only available in CSV and RFC. What is the attribute name in OData?

Use case: I have a user who fills in a form on the website twice, once with email and first and last name, and once with only email. The second interaction would make the first and last name that I got from the first interaction blank...

Also in csv upload you have in the Interactions template all these additional fields for the contact data e.g. firstname, lastname, etc. Those are also in CUAND_CE_IA_RT; but how do you fill these with OData? In the structure, e.g. FirstName is not a valid attribute within Interaction, only within Contact... and without delta mode I have issues with fields being made blank when I upload both interaction and contact data :s

Thanks,

Joyca

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

7 Answers

  • Best Answer
    Sep 25, 2017 at 06:03 PM

    Hi Joyce,

    We opened up a support ticket to clarfiy the confusion about the update mode of OData service. The update mode for OData interaction import is "C". See the answer from SAP Support below:

    Dear Customer,

    When loading data via OData we use IC Update Mode C. This means we call the contact determination with update mode N first, but if the customer does not exist yet we call again with D (Delta). This leads to the creation of a contact (that's why it is called C). If you want to set the update mode always to N (because you don't want to create a contact) you can use BAdI CUAN_CE_IA_UPLOAD. Please do not use the checks included in the example if you do not really did them, because they slow down the import.

    Best regards,

    Rolf Schumann

    Add comment
    10|10000 characters needed characters exceeded

    • Thanks Hakan,

      I'll do a test again in my system later.

      But just to check I understand it right:

      - you can't set which update mode to use for OData via an attribute in your OData call itself, it's always "C" by default

      - C means that when importing "contact" data via OData, the system first checks if a contact with this ID and IDOrigin already exists. If not a new contact is created. But if it DOES exist, what then?

      Because in my first tests some months ago my second call seemed to overwrite the firstname and lastname of my contact with blanks... or maybe I didn't write my OData example payload correctly; I think I wrote "FirstName" : "Tina" in my first call and "FirstName" : "" in my second call instead of removing the FirstName node alltogether; that might be why I got blanks...

      Thanks in any case already for sharing this useful information!

      Kr

      Joyca

  • avatar image
    Former Member
    Jun 20, 2017 at 08:40 AM

    Hi Joyca,

    wWith the OData for importing an Interaction, it is not possible to change contact data. To do so, you either have to use the Data Import feature or the OData for importing Contacts.

    Best regards

    Stefan

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 22, 2017 at 10:09 AM

    Hi Stefan,

    Thanks for your answer, but I'm not sure I understand.

    The situation is: someone fills in multiple request forms on my website (without a login in a user account); so this is a combination of contact data (the fields he fills in) and interaction data (the fact that he requests something like a brochure or product or appointment).

    So then my odata would be something like:

    "Interaction":

    - IA_TYPE: SALES_ORDER

    - contact ID origin: website

    - contact ID: 123456789 (some tracking code)

    - timestamp: 22/06/2017 12h00

    ...

    "Contact"

    - First Name: John

    - Last Name: Doe

    - email: john.doe@gmail.com

    - IDOrigin: website

    - ID: 123456789

    - ...

    then a few minutes afterwards he fills in another form, but doesn't fill in as many fields. something like this:

    "Interaction":

    - IA_TYPE: APPOINTMENT

    - contact ID origin: website

    - contact ID: 123456789 (some tracking code, still the same as it's in the same session)

    - timestamp: 22/06/2017 13h00

    ...

    "Contact"

    - First Name: (left blank)

    - Last Name: (left blank)

    - email: (left blank)

    - IDOrigin: website

    - ID: 123456789

    Then because of this second load; my original firstname, lastname, ect, are completely deleted!

    Or is there a better way to fill the id origin and id in this case?

    Thanks,

    Joyca

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Joyca Vervinckt

      I did not say that you can't upload IA and IC data together, I just said you should not, to avoid the issues you've just described. If you upload an IA with reference to an IC that already exists, the IA is assigned to that IC accordingly. However, if no contact exists, a new one is created to be able to link the IA to possibly related IAs incoming in the future pointing to the same contact.

      Are you sure that Delta mode was applied in your case when loading the Interaction and can you check whether both interactions point to the same Interaction Contact (same GUID)?

  • Jun 23, 2017 at 07:05 AM

    Hi Akıl,

    There's a BAdI for adapting upcoming interactions so you can make some changes according to IA_TYPE in related method of that interaction BAdI (I cannot provide the exact names at the moment as I don't have access to our Hybris DEV system right now). However, in that BAdI method, all interaction contact details would be empty for interactions as they're all empty in interaction OData services.

    However, I guess I agree with Stefan at this point. Meaning, I'd rather use interaction contact OData services besides interaction OData services in source system.

    Regards,

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 22, 2017 at 06:41 PM

    Hi Joyce,

    In the same documentation you referred, there's a headline named 14. Appendix at the end. On page 117, you can see that OData Property is empty for the field IC_UPDATE_MODE. Moreover it's all empty for those fields regarding interaction contact data.

    I guess this means that, you cannot update interaction contact data with inbound interactions using interaction OData service as Stefan already pointed out.

    I hope this helps

    Best Regards

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 30, 2017 at 04:27 PM

    Hi Joyce,

    the right approach in your case would be to upload with the first call contact data and interaction data to the system.

    If you can ensure at the second call that the customer master data is already in the system you don't have to upload customer master data in this case again. Just upload the interaction with the known Customer ID and ID_ORIGIN. The system will link the interaction to the right contact.

    Best regards

    Maik

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 26, 2017 at 06:50 PM

    Hi Joyce,

    I answered your questions below:

    1- - you can't set which update mode to use for OData via an attribute in your OData call itself, it's always "C" by default

    - Exactly.

    2- C means that when importing "contact" data via OData, the system first checks if a contact with this ID and IDOrigin already exists. If not a new contact is created. But if it DOES exist, what then?

    - Then the system just imports the interaction meaning that it behaves as if IC_UPDATE_MODE is N (No update to contact details whatsoever)

    If no contact is found, then the system creates a new contact and fill the fields with contact data of incoming nteraction. But those fields should not be empty as the system behaves as if IC_UPDATE_MODE is D in this case.

    So for last case, I don't know how it happened because OData service should not touch your contact if it finds a contact with same IDOrigin and ID, let alone empty fields overwiriting existing contact data

    Kind regards

    Add comment
    10|10000 characters needed characters exceeded