I want to understand the behaviour of an event fired via REST api in journey builder.

a. Each time while firing why i need to provide all the column values of the associated DE in data method, if don't provide it throws me an below error :

{"message":"Required Event Data fields are missing: customer email, mode_of_payment, number_of_items, orderid, price, seller id, status","errorcode":30000,"documentation":""}

b. After providing all the values, it is adding a new row in the DE and starting the interaction.

Below is the sample code


Authorization: Bearer MYTOKEN

{"ContactKey":"30","EventDefinitionKey":"ContactEvent-MyEVENT","Data":{"OrderID":"30","Status":"Confirmed","Price":"111","Number_of_Items":"11","Mode_of_Payment":"CC","Customer Email":"abc@gmail.com","Seller ID":"S1"}}

My event contains a filter criteria based on the Status field.

I don;t want to add a new row in the DE, just want to take all the rows who's status is modified to "Confirmed" (Excluding the previous "Confirmed" rows or were already part of interactions)

Thanks Shashank

| improve this question | | | | |

The error message that you are receiving is because these fields are required fields in your Event Source Data Extension. If you change these fields to nullable (you will have to remove records in the DE first to do this) your request work and you won't need to include them.

However, as you point out, this creates new records in your Event Source Data Extension each time. What you need to use is the contactEvents method. I've documented the procedural steps on this page. This will serialise your event data into a separate Events Data Extension, without requiring to add a new row to the Event Source Data Extension. In summary this method:

  1. Serializes Event data into the Events Data Extension (not the Event Source)
  2. Causes the Contact to enter the related journey

<plug>You can read more about this in my Journey Builder Developer's Guide book.</plug>

| improve this answer | | | | |

Firing the event kicks off the journey for that contact, the logic within the journey will then determine what messages get sent, wait times, decision points, and exit criteria.

Journey's typically work off a data extension - an automation will look for records in the data extension and will then add them to the journey.

This API call effectively replicates that and so adds another record in the data extension as well.

| improve this answer | | | | |
  • Can we say that firing an event via APi will always add a new row in DE ? – SJain Feb 4 '16 at 6:22
  • Also, I want to figure out how can we fire an event basis of updation in DE via API. – SJain Feb 4 '16 at 6:22
  • Firing an event via the Api will always be added to the data extension, provided all the required fields are present. Rows in the data extension will only be processed to kick off a journey once. So updating the record in the DE wouldn't cause a journey to start. What's the problem with duplicate rows in the DE? It's only meant to be used for the purpose of initiating a Journey, you can use other DEs for other purposes. – Alex McDonald Feb 4 '16 at 6:38

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.