cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Delete/empty specific values in fields like connected account field

Former Member
0 Likes
1,054

Hi there,

First question
I was wondering if it is possible to delete the values in specific fields. In this case it's about the account field. We would like to delete 0.0IPA en 0.0IPA_TEST. However those accounts doesn't exist as an account but they are still visible within +/-6.400 contacts.

Second question
And in addition to previous question, can we give this segment (so the 6.400 contacts) a specific interaction? Via upload or within the system somewhere?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Likes

andyberendsen8, I saw your reply. In that case I recommend you to use the API_MKT_CONTACTS_SRV to update those fields. Documentation of the API here:

https://api.sap.com/api/API_MKT_CONTACT_SRV_0002/resource

You must use the PATCH operation of this endpoint: /ContactOriginData(ContactOrigin='{ContactOrigin}',ContactID='{ContactID}')

This is a sample JSON you can use in postman:

{
    "OriginDataLastChgUTCDateTime": "2020-07-02T12:00:00",
    "ContactOrigin": "CONTACT_ORIGIN",
    "ContactID": "1234567890",
    "FirstName": "John",
    "LastName": "Doe",
    "EmailAddress": "johndoe@gmail.com"
}

I don't know why, but I'm checking my postman collections and I used PUT. Check that with PATCH first. If it doesn't work, try with PUT.

The URL I used is the following: https://{{tenant}}-api.s4hana.ondemand.com/sap/opu/odata/sap/API_MKT_CONTACT_SRV/ContactOriginData(ContactID='1234567890',ContactOrigin='CONTACT_ORIGIN')

Let me know if you need more help. Regards,

Former Member

Many thanks, bruno.gonzalez! So do I understand you correctly it isn't possible to upload a file with empty files (with using " " or something)? Otherwise, I will check with my developer.

Former Member
0 Likes

Indeed Andy. As I saw with your tests, you cannot use the data file upload to do that.

SCHNEIDERT
Active Contributor

Hi andyberendsen8 and bruno.gonzalez,

in my opinion the update should work via CSV (see my Comment to my answer above).

As far as I know the difference between PUT and PATCH is that with PUT you have to provide all the Attributes, while with PATCH you only need to provide the attribute that you want to update. The other fields are not affected.

BR Tobias

Former Member
0 Likes

Hi andyberendsen8. Adding to what schneidert said, you can also export those contacts directly from the segmentation. If they're less than 10K (in this case you have 6.5K), you can download the IDs directly from the segmentation (if you have the ID available). I recommend you to filter first by specific Origin ID and then select the ID field and use the download button from the preview.

Here's a screenshot:

  1. Select ID Origin and filter by the one you need.
  2. Click on that segment.
  3. Select ID with the preview.
  4. Select "Max" in the preview option and click on the download button.

Regards,

Former Member

Hi Bruno, thanks a lot. This really helps.

Former Member
0 Likes

See my last question in the comment of Tobias, maybe you know this as well. Would be great. Then it's all solved for now.

SCHNEIDERT
Active Contributor
0 Likes

Hi Andy,

I think therefore you have to do an update on the Contacts. So, to import/overwrite each Contact data again without the assignment to the Account.

Interactions can be uploaded via CSV or OData, but unfortunately not for a specific segment. So I think the easiest way is to export these contacts with their IDs and then create a CSV file for the interactions.

BR Tobias

Former Member
0 Likes

Thanks Tobias. So do you think we can overwrite the existing values with empty values? I can try that.

What is the best way to export a segment? I already made a specific segment in the segmentation model but I don't see the segment in the dropdown list in the export. Or do I have to take other steps?

SCHNEIDERT
Active Contributor

Hi andyberendsen8,

yes, that's what I think what should work.

Concerning the Export: You should use your segment in Segmentaion Modeling to create a target group. After that you can use your export definition to export the target group.

To make the Segmentation Profile available in the list you have to go to Segmentation Configuration app, choose the profile and enable it for Export definition there. After that it should be visible.

Hope that helps. If so, please mark answer as accepted. Let me know if you need some more information.

BR Tobias

Former Member

Remember that if you use the Data File Load functionality, you need to set all the fields for the contact because it doesn't update just the ones you selected.

Former Member
0 Likes

Hi Tobias, thanks for your quick reply. That helps!

But then I tried to upload fields with no data, so I leave the columns empty (see screen shot below). However, then the system don't overwrite the data. How can I upload empty fields?

SCHNEIDERT
Active Contributor
0 Likes

Hi andyberendsen8,

Since the upload via CSV is an update on the whole contact, it should work. I just tested in my system and the behavior is as expected.

What I can imagine is that the assignment/relationship of the Contact to the Company came from another Origin. Is that possible? So if you imported the Contact with the relationship to the Company with another ID_ORIGIN than the one you are providing now, maybe that's leads to the error.

See my test: I imported the Contact Ronald Scobee with the Relationship to Nasa Company first.

After that I used the same CSV file and only cleared the COMPANY_ID_ORIGIN and COMPANY_ID field and uploaded it again.

Now the relationship is gone while the rest stays the same as you can see on the Screenshot.

So make sure that the "deletion" of the relationship is done using the same Origins as for the creation.

Maybe that helps.

BR Tobias