Builds a support-routing Choice request, branches on the inferred department union, and shows typed error handling for authentication and exhausted rate-limit retries.
Original by Jev GuideGetting startedIndependent field guideSource reviewed
Before you dive in
What you’ll find in the original
Define department options once so the answer type follows the criteria keys.
Hand low-confidence choices to a person instead of using a universal cutoff blindly.
Keep the API key in server-side code and handle typed client errors.
Worth knowing
The examples were type-checked against SDK 0.6.0 but not run against the live API; the shown 0.5 cutoff is illustrative.