Module: Zavudev::Models::WebhookEvent
- Extended by:
- Internal::Type::Enum
- Defined in:
- lib/zavudev/models/webhook_event.rb,
sig/zavudev/models/webhook_event.rbs
Overview
Type of event that triggers the webhook.
Message lifecycle events:
message.queued: Message created and queued for sending.data.status=queuedmessage.sent: Message accepted by the provider.data.status=sentmessage.delivered: Message delivered to recipient.data.status=deliveredmessage.read: Message was read by the recipient (WhatsApp only).data.status=readmessage.failed: Message failed to send.data.status=failed
Inbound events:
message.inbound: New message received from a contact.data.conversationIdis the inbox thread id (deep-link withhttps://dashboard.zavu.dev/{locale}/inbox?conv={conversationId}); it isnullwhile the conversation row is still being created (the first message of a brand-new thread, or several near-simultaneous first messages), whereconversation.newcarries the id instead —GET /v1/messages/{messageId}always has it. Reactions are delivered asmessage.inboundwithmessageType='reaction'. When the contact replied to (quoted) an earlier message,data.contentcarries the reply context:replyToMessageId,replyToProviderMessageId,replyToFrom,replyToText, andreplyToMessageType.data.providerTimestampis the provider's original receive time in Unix milliseconds (the moment the channel received the message from the contact — WhatsApp, Telegram, Instagram, Messenger;nullfor SMS and email). Compare it against the top-leveltimestamp(when Zavu dispatched the webhook) to detect and ignore delayed deliveries.message.unsupported: Received a message type that is not supported
Broadcast events:
broadcast.status_changed: Broadcast status changed (pending_review, approved, rejected, sending, completed, cancelled)
Other events:
conversation.new: New conversation started with a contact.datacarriesconversationId(the inbox thread id — deep-link withhttps://dashboard.zavu.dev/{locale}/inbox?conv={conversationId}), thephoneNumberoremailkey,channel,firstMessageId,firstMessageText, andprofileName.template.status_changed: WhatsApp template approval status changed
Partner events:
invitation.status_changed: A partner invitation status changed (pending, in_progress, completed, cancelled, failed).datacarriesinvitationId,clientName,clientEmail,connectionType(whatsapp_wabaormessenger),previousStatus, andcurrentStatus. Oncompletedit also carriessenderIdandconnectedAccount(channel,id,name) — the WhatsApp number or Facebook Page that was linked. Onfailedit carriesfailureReason; the invitation link stays usable, so a client can retry it.
Voice Agent events: For every voice event, data carries callId,
direction, from, to, status, durationSeconds, endReason, and
transcriptAvailable. The terminal events (call.completed, call.failed)
additionally carry cost — what the call was billed, in USD, combining
telephony and the managed voice pipeline — and currency. They are dispatched
after the call is charged, so cost is populated rather than zero; telephony
can still be settling on an outbound call, in which case
GET /v1/calls/{callId} holds the reconciled figure.
call.initiated: An outbound call was created and is dialing, or an inbound call was received.data.status=ringingcall.answered: The call was answered and the voice agent is connected.data.status=in_progresscall.completed: The call ended after a conversation.data.status=completed;durationSecondsandendReasondescribe how it ended, andtranscriptAvailableindicates whether a transcript can be fetched.call.failed: The call could not be completed (busy, no answer, canceled, or an error).data.statusis the terminal status andendReasonexplains the cause.
Custom domain events:
domain.verified: A custom email domain passed verification (DKIM, and SPF/DMARC/MAIL FROM if enhanced records are enabled)domain.failed: A custom email domain failed verification or is partially verified
Constant Summary collapse
- MESSAGE_QUEUED =
:"message.queued"- MESSAGE_SENT =
:"message.sent"- MESSAGE_DELIVERED =
:"message.delivered"- MESSAGE_READ =
:"message.read"- MESSAGE_STATUS =
:"message.status"- MESSAGE_FAILED =
:"message.failed"- MESSAGE_INBOUND =
:"message.inbound"- MESSAGE_UNSUPPORTED =
:"message.unsupported"- BROADCAST_STATUS_CHANGED =
:"broadcast.status_changed"- CONVERSATION_NEW =
:"conversation.new"- TEMPLATE_STATUS_CHANGED =
:"template.status_changed"- INVITATION_STATUS_CHANGED =
:"invitation.status_changed"- CALL_INITIATED =
:"call.initiated"- CALL_ANSWERED =
:"call.answered"- CALL_COMPLETED =
:"call.completed"- CALL_FAILED =
:"call.failed"- DOMAIN_VERIFIED =
:"domain.verified"- DOMAIN_FAILED =
:"domain.failed"
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Internal::Type::Enum
==, ===, coerce, dump, hash, inspect, to_sorbet_type, values
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/zavudev/models/webhook_event.rb', line 109
|
Instance Method Details
#self?.values ⇒ ::Array[Zavudev::Models::webhook_event]
45 |
# File 'sig/zavudev/models/webhook_event.rbs', line 45
def self?.values: -> ::Array[Zavudev::Models::webhook_event]
|