[SalesForce] Duplicates in Marketing cloud API (POST /interaction/v1/events)

Hi I am triggering a journey using Marketing Cloud "Fire the Event" API. As this API adds data into the data extension which eventually triggers the configured journeys.

If my primary key is unique, data is added into DE correctly, but if data already exits, it does not update, but REST API request is rejected.

Since I need to keep just once copy of latest data. So how do I handle this issue.

Fire the event – API

{
"message": "The event data contains duplicate value for an existing primary key. Please correct the event data and try again.",
"errorcode": 30000,
"documentation": ""
}

400 Bad Request
The request cannot be fulfilled due to bad syntax.

Best Answer

You will need to use an Event source DE that does not use a Primary Key.

I understand what you are trying to achieve here; you want to re-inject the Contact into the Journey, but updating the field values when you do so.

This is not how the Events method and Journey data works. The attributes for a record in the Event source DE will accompany the Contact as they move through the Journey. They can't be updated later.

If you want to add data for an existing Contact and inject them into the Journey, you should look at setting up an Event (in Data Designer) and using the ContactEvents method instead. You can then use this data as Contact data in the Journey.

Related Topic