Skip to main content

⚠️ SUPERSEDED — This runbook is outdated. The current provisioning process uses Telnyx + LiveKit Cloud (not Cartesia/Twilio). See knowledge/runbooks/voice-provisioning.md for the current runbook.

Knowledge > Runbooks > Voice Ops > Add a New Church Voice Agent

Add a New Church Voice Agent (ARCHIVED)

Provision a new church on the multi-tenant ChurchWiseAI voice agent. No redeploy required — adding a DB row is sufficient.

Prerequisites

  • Supabase MCP or direct DB access
  • Twilio account access (for phone number configuration)
  • Church must have an active voice or bundle subscription in premium_churches
  • Church's id (UUID) from the churches table

Steps

  1. Verify the church exists and has an active subscription

    SELECT c.id, c.name, pc.plan, pc.status
    FROM churches c
    JOIN premium_churches pc ON c.id = pc.church_id
    WHERE c.id = '[uuid]';

    Confirm status = 'active' and plan includes voice (e.g., voice_starter, pro_bundle).

  2. Determine the Twilio phone number

    Option A — Church forwards their existing number to Cartesia (preferred):

    • Provide the church with the Cartesia inbound webhook URL from the Cartesia dashboard.
    • Church sets call forwarding at their phone carrier level.

    Option B — Buy a new Twilio number:

    stripe customers list # not stripe — use Twilio CLI
    twilio phone-numbers:buy:local --country-code US --area-code [areacode]

    Note the new number (e.g., +15551234567).

  3. Configure Twilio forwarding to Cartesia

    In the Twilio console (or CLI), set the inbound call webhook for the phone number to the Cartesia managed endpoint URL. Retrieve the endpoint URL from the Cartesia dashboard or last deploy output.

  4. INSERT the church_voice_agents row

    INSERT INTO church_voice_agents (
    church_id,
    twilio_phone_number,
    agent_name,
    greeting_message,
    is_active,
    created_at,
    updated_at
    ) VALUES (
    '[uuid]',
    '+1[10-digit-number]',
    '[Church Name] Assistant',
    'Thank you for calling [Church Name]. How can I help you today?',
    true,
    now(),
    now()
    );
  5. Optionally add a system prompt override for church-specific customization:

    UPDATE church_voice_agents
    SET system_prompt_override = 'You are the friendly assistant for [Church Name], a [denomination] church in [city]. [Any specific instructions].'
    WHERE church_id = '[uuid]';
  6. Configure Cal.com scheduling (optional, if church uses appointment booking)

    UPDATE church_voice_agents
    SET cal_api_key = '[church-cal-api-key]',
    cal_event_type_id = [event-type-id]
    WHERE church_id = '[uuid]';
  7. Place a test call to the church's forwarded number and verify:

    • The agent answers with the correct greeting
    • The agent identifies the correct church name
    • Basic Q&A works (ask service times, location)
  8. Verify call log entry was created

    SELECT id, church_id, created_at, call_outcome, duration_seconds
    FROM voice_call_logs
    WHERE church_id = '[uuid]'
    ORDER BY created_at DESC
    LIMIT 1;

Verification

  • Test call completes with correct church greeting.
  • voice_call_logs shows a new row for the church.
  • church_voice_agents.is_active = true for the church.

Rollback

To remove a church from the voice agent (without deleting history):

UPDATE church_voice_agents
SET is_active = false
WHERE church_id = '[uuid]';

To fully remove (only if no call history exists):

DELETE FROM church_voice_agents WHERE church_id = '[uuid]';

See Also