Skip to content

Conversations

Conversations represent active messaging threads between your WhatsApp account and customers. CubeConnect automatically manages conversation sessions, tracks the 24-hour messaging window, and logs all messages.

Conversation Model

FieldTypeDescription
idintegerUnique conversation session ID
conversation_flow_idintegerAssociated conversation flow
whatsapp_account_idintegerWhatsApp account ID
customer_phonestringCustomer phone number
current_step_idintegerCurrent step in the conversation flow
session_dataobjectCollected data from the conversation
started_atdatetimeSession start time
last_interaction_atdatetimeLast customer interaction
expires_atdatetimeSession expiration time
is_completedbooleanWhether the flow has completed

24-Hour Messaging Window

WhatsApp enforces a 24-hour messaging window. You can send free-form text messages only within 24 hours of the customer's last message.

Customer sends message → Window opens (24 hours)

Within 24h: Send text, media, interactive messages

After 24h: Only pre-approved templates allowed

Checking Window Status

The CRM API provides a session status endpoint to check the current window:

GET /api/crm/{customer}/session-status

Response:

json
{
  "window_active": true,
  "last_inbound_at": "2026-02-26T14:00:00Z",
  "expires_at": "2026-02-27T14:00:00Z",
  "remaining_minutes": 1380,
  "templates": []
}

When the window is expired:

json
{
  "window_active": false,
  "last_inbound_at": "2026-02-24T10:00:00Z",
  "expires_at": "2026-02-25T10:00:00Z",
  "remaining_minutes": 0,
  "templates": [
    {
      "id": 1,
      "name": "order_confirmation",
      "language": "ar",
      "body": "Your order {{1}} is confirmed. Total: {{2}}",
      "param_count": 2
    }
  ]
}

Message Types

Messages within a conversation can be:

TypeDirectionDescription
textBothPlain text
imageBothImages (JPEG, PNG, WebP)
videoBothVideos (MP4)
audioBothAudio/voice notes
documentBothFiles (PDF, etc.)
templateOutboundPre-approved templates
interactiveOutboundButtons and lists
locationInboundGPS coordinates
stickerInboundSticker images
reactionBothEmoji reactions

Message Statuses

Each outbound message goes through these statuses:

StatusDescription
queuedMessage accepted by CubeConnect
sentSent to WhatsApp Cloud API
deliveredDelivered to recipient's device
readRead by recipient
failedDelivery failed

Conversation Categories

WhatsApp categorizes conversations for pricing:

CategoryDescriptionInitiated By
SERVICECustomer-initiated supportCustomer
MARKETINGPromotional messagesBusiness (template)
UTILITYTransactional updatesBusiness (template)
AUTHENTICATIONVerification codesBusiness (template)

INFO

CubeConnect automatically determines the conversation category based on the message type and template category.

CubeConnect WhatsApp Business Platform