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
start: | |
// The user has to specifically request a livechat session. | |
// A simple solution for this is to create a dedicated flow | |
// that handles all the livechat request lifecycle | |
// Start by providing a button to initiate the livechat session. | |
// This button must have a payload of LIVECHAT_SESSION_START | |
say Question( | |
"Do you need some help from a human agent?", | |
buttons=[Button("Yes, talk to a human!", payload="LIVECHAT_SESSION_START")] |
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
start: | |
say "His palms are sweaty, knees weak, arms are heavy" | |
say Text("There's vomit on his sweater already, mom's spaghetti") | |
say "He's _nervous_, but **on the surface** he looks ~calm and ready~" | |
say Typing(2000) | |
say Question( | |
"Hi! My name is:", | |
buttons=[ | |
Button("What?", payload="btn1"), | |
Button("Who?", payload="btn2", style="danger"), |
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
start: | |
say "His palms are sweaty, knees weak, arms are heavy" | |
say Text("There's vomit on his sweater already, mom's spaghetti") | |
say "He's _nervous_, but **on the surface** he looks ~calm and ready~" | |
say Typing(2000) | |
say Question("Hi! My name is:", buttons=[Button("What?"), Button("Who?")]) | |
say Question( | |
"Hi! My name is:", | |
button_type="quick_reply", | |
buttons=[ |
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
start: | |
say "His palms are sweaty, knees weak, arms are heavy" | |
say Text("There's vomit on his sweater already, mom's spaghetti") | |
say "He's _nervous_, but **on the surface** he looks [calm and ready](https://www.youtube.com/watch?v=_Yhyp-_hX2s)" | |
say Typing(2000) | |
say Image("https://images.unsplash.com/photo-1560114928-40f1f1eb26a0") | |
say Question("Hi! My name is:", buttons=[Button("What?"), Button("Who?")]) | |
say Question( | |
"Hi! My name is:", | |
buttons=[ |
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
start: | |
use Button("Yes", accept=["oui", "yes", "y"]) as btny | |
use Button("No", accept=["non", "no", "nop", "nope"]) as btnn | |
say "Many printer issues come from empty cartridges." | |
say Question("Is that your case?", buttons=[btny, btnn]) | |
hold | |
if (event match btnn) goto comments | |
say "Let's follow these simple steps to replace your ink cartridge!" | |
say "Step 1: Lift up the scanner unit and open the cartridge older." | |
say Image("https://cdn.csml.dev/customers/4140eea8-4825-4df6-981d-c1ee239884bc/files/29f64cb9-308b-4ff4-8e7c-ad2dfe20c37b/etape1.jpg") |
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
bye: | |
say Typing(1000) | |
say "OK! Ping me whenever you need me!" | |
goto end |
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
gethelp: | |
say Typing(1000) | |
say "I'm a nice bot helping you find out about your costs within your AWS account. Isn't that great?" | |
goto select |
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
getforecast: | |
use Button("Today") as tdy | |
use Button("Tomorrow") as tmw | |
use Button("This month") as mo | |
use Button("This year") as yr | |
say Typing(1000) | |
say Question( | |
"OK, I'm going to check your cost forecast from your account in AWS Cost Explorer. What is the time period?", | |
buttons = [tdy, tmw, mo, yr] | |
) |
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
getcosts: | |
use Button("Today") as tdy | |
use Button("Yesterday") as ysdy | |
use Button("Month to date") as mtd | |
use Button("Year to date") as ytd | |
use Button("Last month") as lm | |
say Typing(1000) | |
say Question( | |
"OK, I'm going to retrieve cost and usage data from your account in AWS Cost Explorer. What is the time period?", | |
buttons = [tdy, mtd, ytd, lm] |
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
select: | |
use Button("Explore my costs", accept=["costs", "cost", "explorer"]) as btnexp | |
use Button("Get a forecast", accept=["forecast", "preview"]) as btnfcst | |
use Button("Who are you?", accept=["help"]) as btnhelp | |
use Button("Nothing, I'm good", accept=["nothing"]) as btnbye | |
say Question("What are you looking for?", buttons=[btnexp, btnfcst, btnhelp, btnbye]) | |
hold | |
if (event match btnexp) goto getcost |
NewerOlder