Skip to main content
Part 7: Capstone: EMI reminders end to end · Lesson 3 of 4 · 20 minutes

Objective

Have Ringg send every finished call to your CRM endpoint as one request, and know which fields to store.

The scenario

After each call, Acme’s CRM needs to know, per loan account, whether the customer promised to pay and for when, with a link to the recording for disputes. In part 6 you read that from Logs by hand; from now on the CRM gets it on its own.

Hands-on

Adding an event subscription

1

Open Event Subscription

Open EMI reminder - Hindi, then Advanced Settings → Event Subscription. With no subscriptions yet, the New subscription form is already open; otherwise click Create Subscription.
2

Point it at the CRM

Leave Method on POST and set Callback URL to your endpoint; Acme’s is https://crm.acme-lending.example/webhooks/ringg. It must use HTTPS and return a 2xx status within 30 seconds, so store the request first and process it later (endpoint requirements).
3

Pick the event

Under Select Events, tick All Processing Done only. It fires once the recording, transcript and both analyses are ready and carries all of them, so the CRM gets one request per call. Call Completed fires for every attempt, busy and unanswered included, with no analysis yet; add it, or Call Started, only for live progress.
4

Add the secret header

Under Custom Headers, click Add Header and enter Authorization with the value Bearer <your-token>. Ringg sends it with every request, so your server can reject requests without it. After saving, the value is masked (sk_l***).
5

Save and fire it

Click Create Subscription: “Event subscription added”, and a card with the Webhook URL, Events and Headers. Place a test call to your phone, answer, and say you will pay on 15 October.
By API, the same subscription is one PATCH /agent/v1 with operation: "edit_event_subscriptions"; see Configure subscriptions.

The request your CRM receives

The all_processing_completed event for one outbound call, from Webhook payloads. This example comes from an agent with other keys; on Ananya, custom_args_values holds due_amount, due_date and loan_account, and client_analysis holds payment_promised, promised_date and objection.

What to store

Checkpoint

The subscription card shows POST, your URL and all_processing_completed. After the test call, your server has logged one request with event_type all_processing_completed, client_analysis_status success, and payment_promised true with the promised_date you gave in client_analysis.

Exercise

Open the card’s menu (⋮), click Edit, tick Call Started too, and click Update Subscription. Place one more test call. Expected result: your server logs a call_started request as the call is dialled, then the usual all_processing_completed. Untick Call Started again afterwards.

What you learned

  • One event, all_processing_completed, carries the whole call; the earlier events are for live progress.
  • Your endpoint answers 2xx fast and deduplicates on call_id plus event_type; retries and callbacks are separate calls that point back with parent_call_id.
  • The promise lives in client_analysis, under the keys you defined in Advanced Analysis.