Skip to main content

Retry Logic

Oktivo supports automatic retries when a call fails to connect (busy, no answer, network error). Configure retry behavior per-call via the retryConfig object.

Configuration

Pass retryConfig when triggering a call:

Parameters

object
Optional retry configuration for the call.

How Retries Work

  1. The initial call is placed immediately
  2. If the call fails (busy, no answer, error), the system waits for the first delay
  3. Before each retry, credits are re-checked if insufficient, the retry is skipped
  4. The process repeats until either:
    • A call connects successfully
    • All retry attempts are exhausted
    • The call is cancelled via API

Retry Delays Example

Credit Pre-Check on Retry

Before each retry attempt, the system verifies your account has sufficient credits:
  • If credits are available → retry proceeds
  • If credits are insufficient → retry is skipped, contact marked as failed
This prevents unexpected charges when your balance is low.

Cancelling Retries

Cancel a call and all pending retries:
The contact status changes to stopped and no further retries are attempted.

Monitoring Retries

Check the current retry state via the call status endpoint:
The response includes:
  • attempts how many attempts have been made so far
  • retryConfig the original retry configuration
  • status current contact status (pending, in_progress, completed, failed, stopped)
  • lastError reason for the most recent failure

Best Practices

  • Start with short delays (5 min) for first retry, increase for subsequent attempts
  • Use 2–3 retries for most use cases more than 3 rarely improves connection rates
  • Monitor credit consumption each retry attempt consumes credits independently
  • Set up webhooks for call.failed to track contacts that exhaust all retries
  • Consider time of day longer delays may push retries into off-hours