Journey Specification Example

The following JSON example represents an entire journey:

1{
2    "id": "unique-UUID-provided-by-SFMC",
3    "key": "a-key-that-is-unique-for-MID",
4    "version": 1,
5    "name": "My first journey",
6    "description": "This is a description of my journey.",
7    "workflowApiVersion": 1.0,
8    "createdDate": "2015-02-18T14:56:13.423",
9    "modifiedDate": "2015-03-10T13:49:05.763",
10    "triggers": [
11        {
12            "key": "event-key",
13            "name": "Starting point for the journey",
14            "type": "Event",
15            "eventDefinitionKey": "my-entry-event-key",
16            "arguments": {},
17            "configurationArguments": {},
18            "metaData": {}
19        }
20    ],
21    "defaults": {
22       "email": [
23           "{{Event.event-key.EmailAddress}}",
24           "{{Contact.Default.Email}}"
25       ]
26    },
27    "activities": [
28        {
29            "key": "call-web-service",
30            "name": "Call web service to get email",
31            "type": "Rest",
32            "metaData": {
33                "flowDisplayName": "CallWebService"
34            },
35            "outcomes": [
36                {
37                    "key": "call-web-service-then-send-welcome-email",
38                    "next": "send-welcome-email"
39                }
40            ],
41            "configurationArguments": {
42                "save": {
43                    "url": "https://www.example.com/endpoint",
44                    "useJwt": false,
45                    "body": ""
46                },
47                "validate": {
48                    "url": "https://www.example.com/endpoint",
49                    "useJwt": false,
50                    "body": ""
51                },
52                "publish": {
53                    "url": "https://www.example.com/endpoint",
54                    "useJwt": false,
55                    "headers": "https://www.example.com/endpoint",
56                    "body": ""
57                }
58            },
59            "arguments": {
60                "execute": {
61                    "url": "https://www.example.com/endpoint",
62                    "inArguments": [{
63                        "myArgument": ""
64                    }],
65                    "body": "",
66                    "useJwt": false
67                }
68            }
69        },
70        {
71            "key": "send-welcome-email",
72            "name": "Welcome email",
73            "type": "EMAILV2",
74            "outcomes": [
75                {
76                    "key": "sent-welcome-email-then-random-split",
77                    "next": "random-split"
78                }
79            ],
80            "metaData":{},
81            "configurationArguments": {
82                "triggeredSend":{
83                    "emailId":"12345678",
84                      }
85           }
86          },
87        {
88            "key": "random-split",
89            "name": "Random split",
90            "type": "RandomSplit",
91            "outcomes": [
92                {
93                    "key": "random-split-then-send-sms",
94                    "next": "send-sms",
95                    "arguments": {
96                        "percentage": 90
97                    }
98                },
99                {
100                    "key": "random-split-then-10-percent-end",
101                    "next": "send-sms2",
102                    "arguments": {
103                        "percentage": 10
104                    }
105                }
106            ]
107        },
108        {
109            "key": "send-sms",
110            "name": "Send SMS",
111            "type": "SMS",
112            "arguments": {
113                "smsToSend": "ef47e4c0-5def-11e3-949a-0800200c9a66",
114                "phoneNumber": ""
115            }
116        },
117        {
118            "key": "send-sms2",
119            "name": "Send SMS 2",
120            "type": "SMS",
121            "arguments": {
122                "smsToSend": "ab47e4c0-5def-11e3-949a-0800200c9a66",
123                "phoneNumber": ""
124            }
125        }
126    ],
127        "goals": [
128        {
129            "key": "goal-key",
130            "name": "Our success metric",
131            "description": "This goal determines the success of the journey",
132            "type": "Event",
133            "arguments": {
134                "criteria": "filterXML_or_JSON_String"
135            },
136            "metaData": {
137                "isExitCriteria": true,
138                "conversionUnit": "percentage",
139                "conversionValue": "50",
140                "eventDefinitionId": "unique-UUID-generated-by-SFMC",
141                "eventDefinitionKey": "Event-unique-key-generated-by-SFMC",
142                "configurationDescription": "PurchaseDate is on or after Today minus 1 day and SubTotal is not null ",
143                "chainType": "none"
144            }
145        }
146    ]
147}