Jev Code CampFOUNDATIONS
0/8 complete
LESSON 03 / 08 6 MIN
Route with Choice
Choose one team from a set of named options.
Use Choice when your application needs one option from a set you define. Its criteria is an object: keys are the possible outcomes, and values describe when each outcome applies.
For a support router, define billing, technical, and sales. Specific descriptions make the boundaries between these teams clearer.
Read answers.team.choice to get the selected key. Choice also returns probabilities and confidence. Your application still decides what to do with those signals.
Your challenge
- Set questions.team.type to choice.
- Add billing, technical, and sales to criteria, each with a non-empty description.
- Keep instructions asking which team should handle the ticket.
request.json
Loading your draft…
Local checks · No API call
Your next decision starts here.
Edit the JSON, then check your work.
Hints are available whenever you need them.