cancel
Showing results for 
Search instead for 
Did you mean: 

Importing campaign performance via API

jose_rangel
Participant
0 Kudos
259

Dear SAP Community,

we are currently using API_MKT_CMPGN_SUCCESS_IMPORT_SRV to import performance data. We don't have any problems when we import aggregated data. But, if we can't import data for specific contents on the same date.

Let's assume we have an email campaign that sends out 2 emails and I want to import external performance data for each email. Using the API, I would these 2 POST requests:

POST Request for Email#1
{
"CampaignID": "0000000542",
"SuccessDataDate": "2020-06-23T16:00:00",
"CampaignContentName": "Email#1",
"NumberOfClicks":"100"
}
POST Request for Email#2
{
"CampaignID": "0000000542",
"SuccessDataDate": "2020-06-23T16:05:00",
"CampaignContentName": "Email#2",
"NumberOfClicks":"50"
}

Since the field "SuccessDataDate" does not look at the time, only the date, the second import will overwrite the first import because it is the same data.

Is there a way to import these 2 datasets for the same date?

Thank you for your support

BR Jose

rajiv_juarbal
Participant
0 Kudos

Hi Jose, did you manage to find a solution for this? I have the same problem for our SMS campaign. I tried passing a campaign success uuid but it still overwrites the data with the same success data date.

Accepted Solutions (0)

Answers (3)

Answers (3)

KunalBansal
Active Contributor

Hello Jose,

Can you try with different time zones as below:

POST Request for Email#1
{
"CampaignID": "0000000542",
"SuccessDataDate": "2020-06-23T16:00:00",
"SuccessDataDateTimeZone": "TZ1",
"CampaignContentName": "Email#1",
"NumberOfClicks":"100"
}
POST Request for Email#2
{
"CampaignID": "0000000542",
"SuccessDataDate": "2020-06-23T16:05:00",
"SuccessDataDateTimeZone": "TZ2",
"CampaignContentName": "Email#2",
"NumberOfClicks":"50"
}

Best Regards,

Kunal

bruno_gonzalez
Active Participant
0 Kudos

Hi jose_rangel. If both approaches are not working, it seems that there's a bug in the API. I recommend you to raise a ticket in the launchpad.

On the other hand, I think you need to check this documentation, because if you have the interactions available, the aggregated success data will be updated automatically:

https://help.sap.com/viewer/b88f770e4b7c4ecead5477e7a6c7b8f7/2005.500/en-US/b9ef4e868f5b45ffb8be8c49...

Here is a list of interactions types that updates the aggregated success data: https://help.sap.com/viewer/0f9408e4921e4ba3bb4a7a1f75f837a7/2005.500/en-US/3646496c62574cb28c405c00...

Let me know if this helps! Regards,

jose_rangel
Participant

Hi bruno.gonzalez

for this use case we will be importing the data from an external source. Therefore, we won't be using interaction to update the aggregated success data. That's why we would need an approach to import performance data per content

BR Jose

bruno_gonzalez
Active Participant
0 Kudos

jose_rangel , if that's not working, I recommend you to create a ticket in the launchpad to ask for a solution, because it seems to be a bug in the API.

bruno_gonzalez
Active Participant
0 Kudos

Hi jose_rangel. Did you try with the attribute CampaignContent that is the ID of the content instead of the name? Another option is to use the ExternalCampaignID in addition to the current fields. If you don't have an ID, just put a 1 and 2 there for each request.

Regards,

jose_rangel
Participant
0 Kudos

Hello kunalkumar.bansal and bruno.gonzalez

Thank you for your answers. I tried with both approaches and I'm still having the same problem unfortunately. I think it goes back to the topic that the field "SuccessDataDate" only looks at the date and if another import with the same date comes (even if the time is different) the second import substitutes the first input.

But there should be a way to import data of several contents for the same day, right?

BR Jose