3

I am trying a simple example of firing an event using Rest API in journey builder.Followed exactly the same steps as were mentioned in the link below.

https://github.com/mattcam/Salesforce-Marketing-Cloud-Developer-Edition-Recipes/blob/master/firing-events.md

The ContactEvents method always give back a "Internal Server Error" on executing the post request with appropriate request headers: Content-type: application/json Authorization:Bearer

Post URL:https://www.exacttargetapis.com/contacts/v1/contactEvents

Request Body: { "contactKey": "rosh@gmail.com", "eventDefinitionKey": "CONTACT-EVENT-a84eba75-4a93-7076-ab38-01009d1be3e0", "data": [{ "name": "Member Preferences", "id": "8C4D69CC-3A0A-49DA-B413-D20AC6C799B2", "items": [{ "values": [{ "name": "Preference", "value": "frankfurter" }] }] }] }

Anyone has any idea why is this method not working and returing Error 500.

Regards, Divyam

0

I apologise, that's my fault as I authored that document — it was a working draft and incomplete (as per my comments on the page). I've now updated it with the final draft. If you follow the procedural steps on this page, everything should work.

I've also added information on using the Fuel REST API Events Method (as an alternative to using contactEvents to fire an Event).

<plug type="shameless"> FYI, this is a chapter from my upcoming book; Journey Builder Developer's Guide, which will be available on Amazon in a couple of weeks. </plug>

  • Can you please provide the correct Rest API method to fire the trigger – Divyam Apr 2 '15 at 11:26
  • Hello Divyam, I'm assuming you are referring to firing an Event; a Trigger comprises of a Filter (a Contact Filter Criteria) and an Event. There are two REST API methods that you can use; 'events' and 'contactEvents'. If you simply want to insert event data into a Data Extension (DE) and get the Contacts to enter an Interaction, then use events method. However, if you want to serialize event data in to a DE that has a cardinal relationship with another DE in an Attribute Group, then use contactEvents method. Both methods are explained on the page in the link you referenced. – Eliot Harper Apr 2 '15 at 21:56

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.