← Back to recipes
Recipe

Support Ticket Resolution

This recipe creates a support inbox, creates a support call playbook, rents and binds a number, places the call, retrieves the call summary, and sends a follow-up email.

Estimated cost~$0.55 / ticket
ChannelsVoice + Email
Voice
Get started in docs →
Step 1

Set case variables

Define the ticket reference, the customer phone number, the customer email, and the area code used for the caller ID search.

Set case variables
export TICKET_ID="4521"
export CUSTOMER_PHONE="+19175550321"
export CUSTOMER_EMAIL="customer@example.com"
export AREA_CODE="415"
Step 2

Create the inbox and call playbook

Create the sender inbox for the follow-up email and the call playbook for the resolution call.

Create the inbox and call playbook
SUPPORT_INBOX=$(spix --json email inbox create \
  --username support \
  --name "Support Team" \
  | jq -r '.data.address')

CALL_PLAYBOOK_ID=$(spix --json playbook create \
  --type call \
  --name "Support resolution" \
  --goal "Resolve the customer billing issue and confirm next steps. Be empathetic and thorough." \
  --persona "Patient, knowledgeable support specialist" \
  | jq -r '.data.playbook_id')
Step 3

Rent and bind the support number

Rent one number in the target area code and bind it to the support call playbook.

Rent and bind the support number
SENDER_NUMBER=$(spix --json phone rent --area-code "$AREA_CODE" --limit 1 | jq -r '.data[0].number')

spix --json phone rent \
  --number "$SENDER_NUMBER" \
  --bind-channel call \
  --bind-playbook "$CALL_PLAYBOOK_ID" \
  --confirm
Step 4

Place the call and retrieve the summary

Start the support call and then retrieve the generated summary after the call completes.

Place the call and retrieve the summary
CALL_SESSION_ID=$(spix --json call create "$CUSTOMER_PHONE" \
  --playbook "$CALL_PLAYBOOK_ID" \
  --sender "$SENDER_NUMBER" \
  | jq -r '.data.session_id')

spix --json call summary "$CALL_SESSION_ID"
Step 5

Send the written resolution summary

Send the follow-up email from the support inbox after the call.

Send the written resolution summary
spix --json email send \
  --sender "$SUPPORT_INBOX" \
  --to "$CUSTOMER_EMAIL" \
  --subject "Your support ticket #$TICKET_ID has been resolved" \
  --body "Hi, following up on our call. Here is a summary of what we resolved and the next steps."
Build your own recipe

Install Spix, then turn this pattern into your own production flow.

Use the docs to adjust the playbook goal, numbers, inboxes, and follow-up messages for your own customers, leads, patients, or operators.

Open the docs →