Skip to main content

AI SMS Conversations

After a lead exists, inbound customer texts can continue as a tracked Avidra conversation.

High-level flow

  1. customer replies by SMS
  2. Avidra validates the Twilio webhook
  3. Avidra finds the workspace by called number
  4. Avidra finds the lead by caller phone
  5. Avidra stores the inbound message
  6. Avidra creates or updates the conversation record
  7. Avidra classifies the thread and evaluates urgency
  8. if allowed, Avidra generates and sends an AI reply

What Avidra stores during this flow

Avidra records:
  • inbound messages
  • outbound messages
  • conversation turns
  • lead events
  • unmatched inbound messages when no lead is found

When AI will reply

AI reply behavior depends on several conditions, not just one toggle. Avidra checks:
  • global AI enablement
  • plan permissions
  • billing status
  • conversation-level AI state
  • daily SMS cap
  • max AI turns per conversation
  • stale conversation timeout
If all guards pass, Avidra builds the reply and sends it through Twilio.

When AI may stop or skip replying

Avidra may skip or stop replies when:
  • AI is disabled globally
  • the workspace plan does not include AI SMS conversations
  • billing is blocked
  • the daily SMS cap is reached
  • the thread hit the max turn limit
  • the thread was auto-closed as stale

Urgency and handoff behavior

Avidra also classifies threads and can trigger special handling for urgent cases. This can include:
  • emergency detection
  • owner handoff
  • conversation status updates
  • owner notifications for qualified leads

What operators should monitor

Watch for:
  • inbound messages arriving with no continued thread
  • ai_reply_skipped behavior caused by caps or billing
  • unmatched replies that did not attach to a lead
  • conversations that auto-close because they went stale