-
Params example for state types: IN_LIST and IN_ALL
{
"forward": 2
}
-
Params example for state type: IN_SEGMENT
Options:
- cond: Indicates the field and operation to be verified. Currently, only the segmentId should be selected.
- forward: indicates the id of the next journey state if condition is applied
{
"cond": {
"segmentIds" : [1],
},
"forward": 2
}
-
Params example for state type: IN_FILTER
Options:
- cond: indicates the field and the operation to check, dateTrunc and datePart both cannot be sent
- forward: indicates the id of the next journey state if condition is applied
If field is date type, to check with today, follow birthday example.
Operators:
- lt -> lower than
- gt -> greater than
- eq -> equal to
- gte -> greater or equal to
- lte -> less or equal to
- neq -> not equal to
- isnull -> is null (the field has no value)
- isnotnull -> is not null (the field has any value)
{
"cond": {
"age" : {
"gt": 30
},
"last_login": {
"isnotnull": true
},
"unsubscribe_date": {
"isnull": true
},
"birthday": {
"useActualDate": {
"active": true,
"offset": "PT0S",
"operator": "eq"
},
"datePart": [
"day",
"month"
]}
},
},
"forward": 2
}
Notes:
isnull: checks for the absence of a field for a customer.
isnull: operator overrides any other operators (gt, eq, etc.) on the same field.
-
Params example for state type: IN_CUSTOM_EVENT
{
"eventName": "test_event",
"forward": 2
}
-
Params example for state type ACTION_PUSH_SEND
Options:
- action: indicates the action to do, in the example send a push
- forward: indicates the id of the next journey state
{
"action": {
"campaignId" : 1
},
"forward": 3
}
-
Params example for state type ACTION_EMAIL_SEND
Options:
- action: indicates the action to do, in the example send a email
- forward: indicates the id of the next journey state
{
"action": {
"campaignId" : 1
},
"forward": 3
}
-
Params example for state type ACTION_SMS_SEND
Options:
- action: indicates the action to do, in the example send a sms
- forward: indicates the id of the next journey state
{
"action":{
"campaignId":66,
"phoneNumberFieldId": 151,
"prefixFieldId": 152,
"customValues": [
{
"fieldId": 143,
"campaignKey": "test"
},
{
"contextKey": "offerBank",
"campaignKey": "testOfferBank"
}
]
},
"forward": 8526
}
-
Params example for state type ACTION_CHAT_SEND
Options:
- action: indicates the action to do, in the example send a chat message
- forward: indicates the id of the next journey state
- The phone number can be provided in two ways:
- Using a single field
phoneNumberFieldId for the complete international number.
- Using two separate fields:
prefixFieldId and phoneFieldId.
{
"action":{
"phoneNumberFieldId": 151,
// or
// "prefixFieldId": 152,
// "phoneFieldId": 151,
"prefixFieldId": 152,
"context": {},
"messages": [
{
"to": "34661819101",
"channel": "whatsapp",
"sendType": "operator",
"contentType": "text",
"content": {
"body": "test chat"
}
}
]
},
"forward": 8526
}
-
Params example for state type ACTION_WEBHOOK
Options:
- action: indicates the action to do, in the example use a webhook template id to send request
- forward: indicates the id of the next journey state
{
"action": {
"webhookTemplateId" : 1
},
"forward": 3
}
-
Params example for state type FLOW_PUSH_CLICK
Notes
- timeout.time: formatted with ISO_8601 Time_intervals
{
"click": {
"forward": 5
},
"timeout": {
"time": "P5D",
"forward": 4
}
}
-
Params example for state type FLOW_SMS
Notes
- timeout.time: formatted with ISO_8601 Time_intervals
{
"click": [
"url": "google.es",
"urlMatchMode": "CONTAINS",
"forward": 5
],
"timeout": {
"time": "P5D",
"forward": 4
}
}
-
Params example for state type FLOW_FILTER
Notes
- Conditions (
cond) has the same format as the one used in the IN_FILTER state
- If field is date type, to check with today, follow birthday example.
{
"filter": [
{
"cond": {
"age": {
"gt": 30
},
"hair": {
"eq": "bold"
}
},
"forward": 5
},
{
"cond": {
"birthday": {
"useActualDate": {
"active": true,
"offset": "PT0S",
"operator": "eq"
},
"datePart": [
"day",
"month"
]}
},
"hair": {
"eq": "long hair"
}
},
"forward": 8
},
]
}
-
Params example for state type FLOW_RANDOM
Notes
- weight: Optional parameter. If not indicated, the customers for each branch will be distributed proportionally.
- name: Optional parameter. Name for each branch. If not indicated, it will be auto-generated.
{
"random":[
{
"forward":5,
"weight":0.2,
"name":"my branch 1"
},
{
"forward":6,
"weigth":0.8,
"name":"my branch 2"
}
]
}
-
Params example for state type FLOW_CUSTOM_EVENT
{
"customEvent": {
"eventName": "test_event_name",
"forward": 5,
},
"timeout" : {
"time" : "P5D",
"forward": 4,
}
}
-
Params example for state type FLOW_BEST_PATH