{
"steps": [
{
"id": "step123",
"name": "Welcome Message",
"created": "2023-01-01T12:00:00Z",
"updated": "2023-01-01T12:30:00Z",
"type": "message",
"grid": {
"x": 100,
"y": 200
},
"elements": [
{
"type": "text",
"content": {
"text": {
"text": {
"DE": "Hallo Welt!",
"EN-GB": "Hello World!"
}
},
"buttons": {
"buttons": [
{
"text": {
"de": "Ja",
"en": "Yes"
},
"value": "flow_123/step_456",
"type": "redirect",
"payload": "BUTTON_CLICKED"
}
]
},
"file": {
"name": "document.pdf",
"bucketId": "bucket789",
"objectId": "object1011",
"mimeType": "application/pdf",
"sizeInByte": 102400,
"fbaId": "fba123",
"waaId": "waa456"
},
"voiceHangup": {
"reason": "user_disconnected",
"headers": {
"X-Reason-Code": "1001"
}
},
"voiceTransfer": {
"target": "+1234567890",
"reason": "agent_transfer",
"headers": {
"X-Transfer-ID": "abc-123"
}
},
"agentHandover": {
"reason": "escalation",
"timeoutSeconds": 60,
"agentId": "agent987",
"groupId": "support_team",
"assignmentMethod": "round_robin"
},
"assignVariable": {
"variableId": "varUserQuery",
"path": "$.data.query",
"value": "What is your return policy?"
},
"updateTags": {
"method": "add",
"tagId": "tag_vip_customer"
},
"snooze": {
"seconds": 3600
},
"unread": {
"unread": true
},
"whatsappTemplate": {
"templateId": "template_order_update",
"parameters": {
"customer_name": "John Doe",
"order_id": "12345"
}
},
"textToSpeech": {
"text": {
"en": "Your call is important to us."
},
"speech": "<speak>Hello <break time='1s'/> World!</speak>"
},
"callSettings": {
"userInputSpeechDetectionTimeout": 5000,
"dtmf": true,
"bargeIn": true
},
"metaWhatsappTemplate": {
"templateName": "order_confirmation",
"templateId": "meta_tpl_123",
"header": {
"file": {
"name": "document.pdf",
"bucketId": "bucket789",
"objectId": "object1011",
"mimeType": "application/pdf",
"sizeInByte": 102400,
"fbaId": "fba123",
"waaId": "waa456"
},
"parameters": [
"{{1}}",
"User Name"
]
},
"bodyParameters": [
"{{1}}",
"Order Number"
],
"buttons": {
"values": [
"button_value_1",
"button_value_2"
]
}
},
"note": {
"note": "Follow up with customer next week."
},
"chatEnd": {
"status": 3
},
"assignTeam": {
"teamId": "team_sales"
},
"assignOperator": {
"operatorId": "operator_john",
"assignToLastAssigned": true
}
}
}
],
"intent": {
"intentId": "t8gsDajqeJAVMZQPB5mp"
},
"delay": {
"seconds": 5
},
"split": {
"a": 50,
"b": 50,
"sameRedirect": false,
"redirects": {
"a": "flow/AAIVrMmsvmfYYeR4xo69/step/vnClGd8WHu3f4KY6dVYL",
"b": "flow/vnClGd8WHu3f4KY6dVYL/step/AAIVrMmsvmfYYeR4xo69"
}
},
"condition": {
"redirects": {
"t": "stepTrue",
"f": "stepFalse"
},
"conditions": [
{
"valueLeft": "{{variable.name}}",
"operator": "==",
"valueRight": "some_value",
"group": 1
}
]
},
"flow": {
"outlets": {
"success": {
"stepId": "stepSuccess",
"name": "Success"
}
},
"flowId": "flowABC",
"entryStepId": "entryStep1",
"redirects": {
"complete": "stepComplete"
}
},
"trigger": {
"triggerId": "gVh98q1ILzabR51miQbH",
"event": "user_subscribed",
"payload": "premium_plan"
},
"redirect": "redirectStep456",
"userInput": "Please enter your name.",
"userInputRequired": true,
"context": {
"intents": [
{
"name": "GreetingIntent",
"intentId": "intent456",
"redirect": "step789"
}
],
"fallbackRedirect": "stepFallback"
},
"app": {
"appId": "appCRM",
"moduleId": "moduleCreateLead",
"paramsJson": "{\"leadName\": \"{{variable.name}}\"}"
},
"description": "This step greets the user and asks for their name.",
"entityDetection": {
"outputVariableId": "varDetectedEntities",
"outputVariablePath": "$.entities",
"prompt": "Extract entities from: {{user_input}}",
"examples": [
{
"value": "I want to book a flight to London.",
"result": "{'city': 'London'}"
}
]
},
"userInputIsSensitive": false,
"runPrompt": {
"outputVariableId": "varPromptOutput",
"outputVariablePath": "$.response",
"prompt": "Generate a summary of the conversation.",
"includeConversationHistory": true,
"useRag": true,
"includeNotes": true,
"knowledgeGroupIds": [
"kg1",
"kg2"
],
"ragContextMessages": 5,
"contextMessageCount": 10
},
"leadAiConversation": {
"prompt": "Help the user book a flight.",
"context": "User wants to travel to Paris.",
"maxIterations": 5,
"ragContextMessages": 5,
"includeConversationHistory": true,
"outlets": [
{
"name": "BookFlight",
"description": "Books a flight for the user.",
"redirect": "stepBookFlight"
}
],
"tools": [
{
"appId": "app123",
"moduleId": "module456",
"description": "Searches for available flights.",
"name": "FlightSearchTool"
}
],
"useRag": true,
"delayMin": 10,
"delayMax": 20,
"delay": true,
"knowledgeGroupIds": [
"kg_flights",
"kg_destinations"
],
"contextMessageCount": 10
},
"contactData": {
"values": "{\"email\": \"user@example.com\"}"
},
"aiConfig": {
"model": 1,
"thinkingBudget": 256,
"seed": 42,
"topP": 0.9,
"temperature": 0.8
},
"end": {
"payload": "thank-you",
"closeConversation": true
}
}
],
"error": "text"
}