Skip to main content

Lost Opportunity Properties

This page defines the structure of the lost opportunity entity, including all properties and their descriptions. Server-managed fields are read-only.

πŸ”Ή Identity​

PropertyTypeRequiredRead-OnlyDescriptionExample
idstring (UUID)NoYesUnique identifier for the lost opportunity"123e4567-e89b-12d3-a456-426614174000"
organizationIdstring (UUID)Yes (create)YesUUID of the organization that owns the record"123e4567-e89b-12d3-a456-426614174001"
organizationNamestringNoYesDenormalized organization name"Acme Inc."
externalIdstringNoNoExternal identifier from the upstream integration (e.g. Dilema form id)"frm_abc123"

πŸ”Ή Type & Status​

PropertyTypeRequiredRead-OnlyDescriptionExample
entityTypeenumYesNoChannel that produced the lost opportunity. One of: iCall, iChat, booking"iCall"
statusenumYesNoRecord status. One of: pending, processed, rejected"pending"

πŸ”Ή Source Interaction​

PropertyTypeRequiredRead-OnlyDescriptionExample
interactionIdstringYesNoIdentifier of the interaction (iCall, iChat, or booking) that was lost"123e4567-e89b-12d3-a456-426614174000"
originstringNoNoOrigin name where the lost opportunity was captured"Website contact form"
visibleAtdate (ISO 8601)NoYesDatetime from which the lost opportunity becomes visible to agents"2026-05-13T15:00:00Z"

πŸ”Ή Loss Details​

PropertyTypeRequiredRead-OnlyDescriptionExample
reasonstringYesNoReason why the opportunity was lost"Customer chose a competitor"
commentstringNoNoFree-form comment from the agent or system"Customer asked to be contacted again in Q3"

πŸ”Ή Contact​

PropertyTypeRequiredRead-OnlyDescriptionExample
userEmailstring (email)NoNoEmail address associated with the lost opportunity"[email protected]"
userPhonestringNoNoPhone number associated with the lost opportunity"+33612345678"

πŸ”Ή Routing & Assignment​

PropertyTypeRequiredRead-OnlyDescriptionExample
userGroupIdstring (UUID)NoNoUser group this record is assigned to"550e8400-e29b-41d4-a716-446655440000"
userGroupstringNoYesDenormalized user group name"Sales Team"
involvedAgentstring (UUID)NoYesUUID of the agent involved in the lost opportunity"123e4567-e89b-12d3-a456-426614174000"

πŸ”Ή Classification​

PropertyTypeRequiredRead-OnlyDescriptionExample
extraFieldsobjectNoNoCustom metadata bag for integration-specific data{ "department": "Sales", "location": "New York" }

πŸ”Ή Timestamps​

PropertyTypeRequiredRead-OnlyDescriptionExample
createdAtdate (ISO 8601)NoYesCreation timestamp"2025-05-13T15:00:00Z"
updatedAtdate (ISO 8601)NoYesLast update timestamp"2025-05-13T15:00:00Z"
deletedAtdate (ISO 8601)NoYesDeletion timestamp (soft delete)null

🧩 Property Details​

  • id: UUID generated by the server. Cannot be modified.
  • organizationId: Server-derived from the security context on create. Pass on create for clarity, but the server enforces ownership.
  • entityType: Identifies the originating channel. iCall for failed calls, iChat for dropped chats, booking for unfulfilled bookings.
  • status: Default pending. The DTO does not accept draft (reserved for internal use).
  • interactionId: Free-form string identifier of the source interaction. Not constrained to UUID.
  • reason: Short text describing why the opportunity was lost. Use a controlled vocabulary in your integration for analytics.
  • userEmail: Validated against RFC email format only when provided.
  • involvedAgent: Server-populated; identifies the agent that handled the interaction.
  • visibleAt: Server-managed; controls when the record becomes visible to agents.

πŸ“Š Property Usage Examples​

Basic Lost Opportunity​

{
"organizationId": "123e4567-e89b-12d3-a456-426614174001",
"entityType": "iCall",
"interactionId": "call_abc123",
"status": "pending",
"reason": "No answer"
}

Complete Lost Opportunity​

{
"id": "123e4567-e89b-12d3-a456-426614174000",
"organizationId": "123e4567-e89b-12d3-a456-426614174001",
"organizationName": "Acme Inc.",
"entityType": "iCall",
"interactionId": "call_abc123",
"status": "processed",
"reason": "Customer chose a competitor",
"comment": "Customer asked to be contacted again in Q3",
"origin": "Website contact form",
"userEmail": "[email protected]",
"userPhone": "+33612345678",
"extraFields": {
"department": "Sales",
"location": "New York"
},
"userGroupId": "550e8400-e29b-41d4-a716-446655440000",
"userGroup": "Sales Team",
"involvedAgent": "123e4567-e89b-12d3-a456-426614174002",
"visibleAt": "2025-05-13T15:00:00Z",
"externalId": "frm_abc123",
"createdAt": "2025-05-13T15:00:00Z",
"updatedAt": "2025-05-13T16:42:11Z"
}

πŸ“˜ Notes​

  • All timestamps are returned in ISO 8601 format with UTC timezone
  • Enum values are case-sensitive strings
  • The organizationId is enforced server-side from the security context
  • involvedAgent, organizationName, userGroup, and visibleAt are server-managed