0

I'm creating a journey through the journey REST API. I want to add a data extension to that journey. To add a specific data extension, as far as I can see, I need the data extensions eventDefinitionKey and Id and I wonder how I get those, I cant seem to find anything in the docs. Does anyone have any experience with this?

1 Answer 1

0

You need to provide your own event definition key, when creating an event definition with the /eventDefinitions POST request. This is similar to populating the EVENT DEFINITION KEY when creating the entry source event in the UI:

enter image description here

Do keep in mind, that it needs to be unique.

Data extension ID is the external key, which is a GUID by default, but can be changed into something more readable (however only in Email Studio and not in Contact Builder):

enter image description here

3
  • What would that payload look like? Like this to create the event: { "type": "Event", "name": "New event definition via API", "eventDefinitionKey": "Test123", "dataExtensionId": "External Key here", "iconUrl": "/images/icon-data-extension.svg", "arguments": { "criteria": "" }, "isVisibleInPicker": false, "category": "Event" } And then provide "Test123" in the metaData as a trigger in the payload to create the journey? Commented Sep 27, 2023 at 10:18
  • @ThorChristensen - did you see this discussion: salesforce.stackexchange.com/questions/178935/… Commented Sep 27, 2023 at 10:20
  • The issue is i want to create a new journey with an existing data extension as entry source. So I cant make a call to get these values as the journey doesnt exist at this point. Its a newly created journey (through REST API) which should use an existing data extension as entry source. Commented Sep 27, 2023 at 10:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .