1

Is it possible to Bulk inject contacts in a journey using API ?

I tried to use the contactEvents method but i have a 500 server error. contactEventsTest is a DE created using the template "Event DE" from the wizard.

Here is my payload :

{   
"eventDefinitionKey": "APIEvent-xxxxxx-xxxxx-xxxxx-xxxx",
"data": [{
    "name": "contactEventsTest",
    "id": "e856d8a7-e7a1-e711-80e3-1402ec819dd8",
    "items": [{
        "values": [
            {
            "name": "ContactKey",
            "value": "ContactKey1TEST"
        },
        {
            "name": "Gain",
            "value": "123"
        }]
    },
    {
        "values": [
            {
            "name": "ContactKey",
            "value": "ContactKey2TEST"
        },
        {
            "name": "Gain",
            "value": "321"
        }]
    }]
}]}
4

this is not officially available for use BUT...

Try the endpoint https://www.exacttargetapis.com/interaction-experimental/v1/batchcontactevents and then something like the following system

    {
  "EventDefinitionKey": "APIEvent-052645c7-f26d-4f86-2222-52719af046f1",
  "ContactPersonType": "Contact",
  "CallerSystemName": "Salesforce",
  "RecordCount": 1,
  "BatchDetails": [
  {
    "Data": {
      "Type": "Article",
      "TouchPoint": "AccountName"
    },
    "contactKey": "0035E0000075fgDQAQ"
  }
]
} 

It is the same thing which is used by the MC Managed Package. It works up to 500 records per batch but the Managed Package does batches of 200.

  • Update on this, using "ContactPersonType": "Contact" now seems to break the decision splits in Journey, so avoid using this attribute, even tho it is still in the managed package :D – Doug Aug 3 '18 at 15:20
  • can you be more precise, what do you mean by break the decision splits ? All contacts fall in the Reminder path ? This is weird :D @Doug – zeljazouli Jan 2 at 16:26
  • 1
    Hey, it was to do with Salesforce contacts being evaluated using a randomly generated Id instead of the contact/lead Id if they were deleted in Marketing Cloud. Therefore any decision split using the contact/lead Id in the relationship evaluated in unexpected ways (for example all going into remainder) – Doug Jan 3 at 9:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.