Skip to Content
0

Delta mode in OData

Jun 19, 2017 at 04:13 PM

196

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

7 Answers

Best Answer
Hakan Köse Sep 25, 2017 at 06:03 PM
0

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

Show 1 Share
10 |10000 characters needed characters left 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

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

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

Share
10 |10000 characters needed characters left characters exceeded
Joyca Vervinckt Jun 22, 2017 at 10:09 AM
0

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

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Joyca,

if no update mode is specified in the payload, DELTA mode should be used. If you want to set it hard to DELTA in CSV or RFC, the column/property name is IC_UPDATE_MODE.

In your example, the data _should_ not be cleared. However, maybe a second (empty) contact was created or a container or sth. else went wrong. We would need to check this in the system to find out what really happened and why.

In general, creation of contacts should not happen via IA uploads, even if it might be possible with the given interfaces. Contacts are master data while interactions are transactional data and therefore, contacts should be created and updated separately.

Best regards

Stefan

0

Stefan,

What do you mean, you cannot upload contact and interaction data together. In every documentation there's slides related to the merging etc that show that hybris marketing analyzes incoming data to see if it's added to an existing contact or if a new one is created. That's aways contact & interaction data together.

Also in the template RFC for interactions, at the end there's all the contact fields like first name etc; but in the odata those don't exist in the "interface" part so there's no other option than to use both at the same time?

0
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)?

0
Hakan Köse Jun 23, 2017 at 07:05 AM
0

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,

Share
10 |10000 characters needed characters left characters exceeded
Hakan Köse Jun 22, 2017 at 06:41 PM
0

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

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

So the answer then would be to use a user exit when handling inbound interactions?

E.g.

For each incoming interaction, if first name is emtpty, check existing contact using the ID received with the new interaction. If contact does have value, overwrite the empty field.

0
Former Member

There is no need to have the contact details being read from the IC table just to fill up the IA payload. What should that be good for?

0
Maik Offerle
Jun 30, 2017 at 04:27 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Hakan Köse Sep 26, 2017 at 06:50 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded