Skip to main content

Lost Opportunities

The Lost Opportunities API lets you record and triage opportunities that did not convert β€” failed iCall, dropped iChat, or unfulfilled booking interactions. Endpoints support creating a lost opportunity, paginated listing with filters, retrieving a single record, updating its status, and deletion.

πŸ” Authentication​

All Lost Opportunities API endpoints require authentication using the ONLIVESITE authentication scheme. Include the following header in all requests:

Authorization: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature

πŸ“Œ Available Endpoints​

Lost Opportunity Management​

  • Create Lost Opportunity - Record a new lost opportunity
  • Get Lost Opportunity - Retrieve a specific lost opportunity by ID
  • List Lost Opportunities - Paginated list with filtering (entity type, status, user, extra fields)
  • Update Lost Opportunity - Modify a lost opportunity's fields (partial)
  • Delete Lost Opportunity - Permanently remove a lost opportunity

πŸ’‘ Common Use Cases​

  • Recording failed or abandoned iCall interactions
  • Capturing dropped iChat conversations for follow-up
  • Tracking unfulfilled booking requests
  • Building agent dashboards segmented by entity type
  • Exporting loss reasons for analytics and reporting

For detailed information about specific operations, please refer to the individual endpoint documentation sections.

API requests are subject to rate limiting to ensure optimal performance. Please contact our support team for your specific rate limits.

πŸ”„ Lost Opportunity Lifecycle​

  1. Capture: A lost opportunity is created when an interaction (iCall, iChat, or booking) fails to convert, with status: pending
  2. Triage: An agent reviews the record and updates status to processed or rejected
  3. Analysis: reason and comment are filled in to explain the loss
  4. Deletion: When no longer needed, the record can be deleted (permanent)

πŸ”Œ Integration with Other Services​

  • iCall: A lost iCall interaction produces a LostOpportunity with entityType: iCall
  • iChat: A dropped iChat conversation produces a LostOpportunity with entityType: iChat
  • Bookings: An unfulfilled booking produces a LostOpportunity with entityType: booking
  • User Groups: Records can be scoped to a user group for routing

πŸ” Security Considerations​

  • All API endpoints require proper authentication (ONLIVESITE scheme)
  • Operations are restricted based on organization membership and user permissions
  • Lost opportunities are isolated between organizations
  • The organizationId is derived from the authenticated security context

🧰 Development Tips​

  • Use entityType to filter by the originating channel
  • Capture reason consistently to enable loss-reason analytics
  • Use extraFields to store channel-specific metadata
  • Paginate list requests β€” default page size is 10

Errors​

Common error responses:

Status CodeDescription
400Bad Request - Invalid input parameters
401Unauthorized - Missing or invalid authentication
404Not Found - Requested resource does not exist
429Too Many Requests - Rate limit exceeded
500Internal Server Error - Something went wrong