Created
April 21, 2017 08:47
-
-
Save Andarist/5fda8b72967018695acb3f832d200ca5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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