Journey Builder Entry Sources (REST API) Documentation
Table of Contents
- Introduction
- Features
- Entry Source via REST API for Journey Builder
- Authentication
- Create Journey REST API Reference
- Triggers Array Property
- Conclusion
Introduction
Salesforce Marketing Cloud Journey Builder is a powerful tool that allows you to create and automate customer journeys across multiple channels. An entry source is a starting point for a journey, which defines how contacts enter the journey. Salesforce Marketing Cloud offers various entry sources, each with its own unique capabilities and configuration options. In this documentation, we will explore the features and configuration options of the Journey Builder Entry Source in Salesforce Marketing Cloud.
Features
- Data Extension Entry: Use data extensions as entry criteria to segment your audience based on specific attributes or behaviors.
- API Event Entry: Trigger journeys based on API events by integrating external systems or applications with Salesforce Marketing Cloud.
- Smart Capture Entry: Start journeys when contacts submit forms created using the Smart Capture feature in Salesforce Marketing Cloud.
- Contact Event Entry: Trigger journeys based on specific actions or interactions performed by contacts in Salesforce Marketing Cloud.
- Google Analytics Entry:Integrate with Google Analytics to trigger journeys based on specific events or behavior captured by Google Analytics.
- In-App Messaging Entry: Trigger journeys based on in-app messaging events, such as message opens or interactions within a mobile app.
- Salesforce Data Entry: Utilize Salesforce CRM data as entry criteria to trigger journeys based on changes or updates in Salesforce objects.
Entry Source via REST API for Journey Builder
In addition to the built-in entry sources mentioned above, Salesforce Marketing Cloud provides the capability to create entry sources via the REST API for Journey Builder. This allows you to programmatically define entry criteria and trigger journeys based on custom events or data sources. By utilizing the REST API, you can integrate external systems, applications, or custom workflows with Journey Builder and dynamically control how contacts enter your journeys.
API Endpoints and Authentication
To configure an Entry Source via REST API for Journey Builder, you need to make use of the following endpoints:
- Authentication Endpoint: This endpoint is used to authenticate your API requests. You need to provide your client ID, client secret, and other necessary credentials to obtain an access token.
- Create Journey Endpoint: This endpoint is used to create a new journey. You can use this endpoint to define the journey's properties, such as its name, description, entry mode, activities, triggers, goals, exits, and definition type.
Refer to the Salesforce Marketing Cloud API documentation for the specific endpoints, request methods, and payload structures required to work with the Entry Source via REST API for Journey Builder.
Authentication
To authenticate your API requests, you typically need to include an authorization header in your API
calls. The header should contain an access token obtained through the authentication process. The
specific authentication method may vary based on your implementation and the API authentication
options provided by Salesforce Marketing Cloud.
Consult the Salesforce Marketing Cloud API documentation for detailed instructions on authenticating
your API requests and obtaining the necessary access token.
Create Journey REST API Reference
To create a journey via the REST API in Salesforce Marketing Cloud, you can make a POST
request to
the /interaction/v1/interactions
endpoint. The payload of the request should contain the necessary
information to define the journey, including its ID, key, name, description, workflow API version,
activities, triggers, goals, exits, entry mode, and definition type.
Here's an example of the API request payload for creating a journey:
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "Journey Builder 1",
"description": "",
"workflowApiVersion": 1.0,
"activities": [],
"triggers": [
{
"key": "TRIGGER",
"name": "TRIGGER",
"description": "",
"type": "EmailAudience",
"outcomes": [],
"arguments": {},
"configurationArguments": {},
"metaData": {
"eventDefinitionId": "f8a476fa-909b-4eef-ba51-ccaaf404e64c",
"eventDefinitionKey": "DEAudience-58c59b6f-63fd-cb52-206b-1ade3d2a0742",
"chainType": "None",
"configurationRequired": false,
"iconUrl": "/images/icon-data-extension.svg",
"title": "Data Extension",
"entrySourceGroupConfigUrl": "jb:///data/entry/audience/entrysourcegroupconfig.json"
}
}
],
"goals": [],
"exits": [],
"entryMode": "OnceAndDone",
"definitionType": "Multistep"
}
In the example above, we have provided a sample payload for creating a journey via the REST API. The payload includes the journey's ID, key, name, description, workflow API version, activities (an empty array in this case), triggers (with a trigger representing an entry source as a Data Extension), goals (an empty array), exits (an empty array), entry mode (set to "OnceAndDone"), and definition type (set to "Multistep").
Triggers Array Property
When creating a journey via the REST API in Salesforce Marketing Cloud, the triggers property in the
payload definition allows you to define the entry source for the journey. The triggers array
contains objects that represent the entry criteria or triggers for the journey.
Example : Data Extension Entry Source Configuration:
"triggers": [
{
"key": "TRIGGER",
"name": "TRIGGER",
"description": "",
"type": "EmailAudience",
"outcomes": [],
"arguments": {},
"configurationArguments": {},
"metaData": {
"eventDefinitionId": "f8a476fa-909b-4eef-ba51-ccaaf404e64c",
"eventDefinitionKey": "DEAudience-58c59b6f-63fd-cb52-206b-1ade3d2a0742",
"chainType": "None",
"configurationRequired": false,
"iconUrl": "/images/icon-data-extension.svg",
"title": "Data Extension",
"entrySourceGroupConfigUrl": "jb:///data/entry/audience/entrysourcegroupconfig.json"
}
}
]
Example : API Event Entry Source Configuration
"triggers": [
{
"key": "TRIGGER",
"name": "Journey Builder 1",
"description": "",
"type": "APIEvent",
"outcomes": [],
"arguments": {},
"configurationArguments": {},
"metaData": {
"eventDefinitionId": "8f35a92e-81c4-44ab-99d7-1ea10428a944",
"eventDefinitionKey": "APIEvent-c026f9d0-c015-764e-f77e-c14e48508952",
"chainType": "None",
"configurationRequired": false,
"iconUrl": "/images/icon_journeyBuilder-event-api-blue.svg",
"title": "",
"entrySourceGroupConfigUrl": "jb:///data/entry/api-event/entrysourcegroupconfig.json",
"sourceInteractionId": "00000000-0000-0000-0000-000000000000"
}
}
]
Example : Smart Capture Entry Source Configuration
"triggers": [
{
"key": "TRIGGER",
"name": "TRIGGER",
"description": "",
"type": "CloudPagesSmartCaptureSubmissionEvent",
"outcomes": [],
"arguments": {
"dataTargetName": "CloudPages_DataExtension",
"formName": "myForm"
},
"configurationArguments": {
"applicationExtensionKey": "cloudpages-jb-event-smart-capture",
"smartCaptureFormID": 402
},
"metaData": {
"icon": "https://cloudpages-jb-event.s10.marketingcloudapps.com/images/icon.svg",
"iconSmall": null,
"statsContactIcon": null,
"original_icon": "images/icon.svg",
"sourceInteractionId": "00000000-0000-0000-0000-000000000000",
"eventDefinitionId": "ee1e1f65-a06a-4ce5-ba14-1501ec54881e",
"eventDefinitionKey": "CloudPagesSma-d19ed10c-842e-8cef-942b-e4e3ac25014e",
"chainType": "None",
"configurationRequired": false,
"iconUrl": "https://cloudpages-jb-event.s10.marketingcloudapps.com/images/icon.svg",
"title": "",
"entrySourceGroupConfigUrl": "https://cloudpages-jb-event.s10.marketingcloudapps.com/entrysourcegroupconfig.json"
}
}
]
Example : Event Type Entry Source Configuration
"triggers ": [
{
"key ": "TRIGGER ",
"name ": "Journey Builder 1 ",
"description ": " ",
"type ": "ContactEvent ",
"outcomes ": [],
"arguments ": {
"serializedObjectType ": 2,
"eventDefinitionId ": "859a2224-da91-483f-a65e-95b1e6498c1f ",
"eventDefinitionKey ": "ContactEvent-be00796b-d9a5-504f-6ddc-e33772af81df ",
"dataExtensionId ": "6e7b20b6-4918-ee11-b853-48df37deb2a2 "
},
"configurationArguments ": {},
"metaData ": {
"scheduleState ": "No Schedule ",
"eventDefinitionId ": "859a2224-da91-483f-a65e-95b1e6498c1f ",
"eventDefinitionKey ": "ContactEvent-be00796b-d9a5-504f-6ddc-e33772af81df ",
"chainType ": "None ",
"configurationRequired ": false,
"iconUrl ": "/images/icon_journeyBuilder-event-person-blue.svg ",
"title ": " ",
"category ": "Event ",
"entrySourceGroupConfigUrl ": "jb:///data/entry/event/entrysourcegroupconfig.json ",
"sourceInteractionId ": "00000000-0000-0000-0000-000000000000 "
}
}
]
Example : Google Analytics Entry Source Configuration
"triggers ": [
{
"key ": "TRIGGER ",
"name ": "All Users ",
"description ": " ",
"type ": "EmailAudience ",
"outcomes ": [],
"arguments ": {},
"configurationArguments ": {
"applicationExtensionKey ": "4dfa951d-7727-4a93-b176-4e0444c61b34 ",
"criteria ": " "
},
"metaData ": {
"icon ": "https://external-audience-selector.s10.marketingcloudapps.com/ga360/ga360-logo.svg ",
"iconSmall ": "https://external-audience-selector.s10.marketingcloudapps.com/ga360/ga360-logo.svg ",
"isConfigured ": true,
"audienceType ": "GA360 ",
"statsContactIcon ": null,
"original_iconSmall ": "ga360-logo.svg ",
"original_icon ": "ga360-logo.svg ",
"audienceId ": 55,
"audienceName ": "All Users ",
"audienceCount ": 0,
"eventDefinitionId ": "501310f7-9692-46fc-bc0b-89bc36e9837f ",
"eventDefinitionKey ": "DEAudience-1e69bf04-b68f-80ec-02f5-761d0c06f2c7 ",
"chainType ": "None ",
"configurationRequired ": false,
"iconUrl ": "https://external-audience-selector.s10.marketingcloudapps.com/ga360/ga360-logo.svg ",
"title ": " ",
"entrySourceGroupConfigUrl ": "https://external-audience-selector.s10.marketingcloudapps.com/ga360/entrysourcegroupconfig.json ",
"sourceInteractionId ": "00000000-0000-0000-0000-000000000000 "
}
}
]
Example : In-App Message Event Entry Source Configuration
"triggers ": [
{
"key ": "TRIGGER ",
"name ": "TRIGGER ",
"description ": " ",
"type ": "Event ",
"outcomes ": [],
"arguments ": {},
"configurationArguments ": {},
"metaData ": {
"eventDefinitionKey ": "ContactEvent-6b4f2864-d3bf-b2f4-7327-3ad26ca0087c ",
"chainType ": "None ",
"configurationRequired ": true,
"iconUrl ": "/images/in-app-engagement-entry/in-app-message.svg ",
"title ": "In-App Message Event ",
"category ": "Event ",
"entrySourceGroupConfigUrl ": "jb:///data/entry/in-app-engagement/entrysourcegroupconfig.json ",
"sourceInteractionId ": "00000000-0000-0000-0000-000000000000 "
}
}
]
Example : Inbound Chat Entry Source Configuration
"triggers ": [
{
"key ": "TRIGGER ",
"name ": "TRIGGER ",
"description ": " ",
"type ": "Event ",
"outcomes ": [],
"arguments ": {},
"configurationArguments ": {},
"metaData ": {
"eventDefinitionKey ": "ContactEvent-210b030c-62fa-5046-2350-655304701b1c ",
"chainType ": "None ",
"configurationRequired ": true,
"iconUrl ": "https://jb-chat-messaging.s10.marketingcloudapps.com/inbound-chat/images/icon.svg ",
"title ": "Inbound Chat ",
"category ": "Event ",
"entrySourceGroupConfigUrl ": "6EC1B29B-1A59-4854-AC57-ABF03035FBBA ",
"sourceInteractionId ": "00000000-0000-0000-0000-000000000000 "
}
}
]
Example : Salesforce Data Entry Source Configuration
"triggers ": [
{
"id ": "25350ee7-8781-4b4a-9f04-35bfa6cb66ac ",
"key ": "TRIGGER ",
"name ": "TRIGGER ",
"description ": " ",
"type ": "Event ",
"outcomes ": [],
"arguments ": {},
"configurationArguments ": {},
"metaData ": {
"eventDefinitionKey ": "ContactEvent-2c696b5a-dfca-bab2-8f50-75a5d2102fd6 ",
"chainType ": "None ",
"configurationRequired ": true,
"iconUrl ": "/jbint-events/images/icon_journeyBuilder-entrySource-Salesforce_white.svg ",
"title ": "Salesforce Data ",
"category ": "Event ",
"entrySourceGroupConfigUrl ": "https://jbinteractions.s10.marketingcloudapps.com/jbint-events/entrysourcegroupconfig.json ",
"sourceInteractionId ": "00000000-0000-0000-0000-000000000000 "
}
}
]
Conclusion
This documentation provided an overview of various entry sources available in Salesforce Marketing Cloud Journey Builder. Each entry source has its own configuration steps and examples for defining the entry source in Journey Builder. By understanding and utilizing these entry sources effectively, you can create personalized and engaging customer journeys. For more detailed information and additional configuration options, please refer to the Salesforce Marketing Cloud API documentation.
Comments
Post a Comment