The flow
Starts it 9Logic 6Service 9
The steps in the order they run, from what starts it.
- 1📥 New NotificationWebhookStarts it
- 2🔊 Twilio Fetches AudioWebhookStarts it
- 3📞 Twilio Status CallbackWebhookStarts it
- 4⚠️ On ErrorError triggerStarts it
- 5Parse NotificationCodeLogic
- 6Get Saved ScriptHttp RequestService
- 7Map Call OutcomeCodeLogic
- 8Log Error → SupabaseHttp RequestService
- 9Is a new order?IfLogic
- 10Prepare TextCodeLogic
- 11Update Call ResultHttp RequestService
- 12Claim Order (insert log)Http RequestService
- 13Skip (not new_order)Respond To WebhookStarts it
- 14🗣️ ElevenLabs: Text → AudioHttp RequestService
- 15200 OKRespond To WebhookStarts it
- 16Fetch Order DetailsHttp RequestService
- 17Skip (already called)Respond To WebhookStarts it
- 18Stream MP3 to TwilioRespond To WebhookStarts it
- 19Build Call ContextCodeLogic
- 20🧠 Claude: Write ScriptHttp RequestService
- 21Extract ScriptCodeLogic
- 22Log: status = calling (save script)Http RequestService
- 23☎️ Twilio: Place CallHttp RequestService
- 24200 Call InitiatedRespond To WebhookStarts it