Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
trigger example:
{
type: "new_customer",
value: true
}
step: { action, outcomes }
action example:
{
type: "protocol_action",
value: {
action: "send_event",
payload: {
type: "notification",
text: "How can i help you?"
}
}
}
outcomes - { outcomeKey: nextStep }
outcomes example:
{
accept: 'step2',
decline: 'step3',
}
whole scenario:
{
step0: {
conditions: [{
type: "new_customer",
value: true
}],
action: {
type: "protocol_action",
value: {
action: "send_event",
payload: {
type: "notification",
text: "How can i help you?"
}
}
},
outcomes: {
reply: 'step1',
decline: 'step2',
},
},
step1: {
action: {
type: "protocol_action",
value: {
action: "send_event",
payload: {
type: "notification",
text: "Our support will reach you as soon as possible"
}
}
},
outcomes: {
reply: 'step4',
decline: 'step5',
},
}
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.