Module: FlowChat::Instrumentation::Events
- Defined in:
- lib/flow_chat/instrumentation.rb
Overview
Predefined event names for consistency
Constant Summary collapse
- FLOW_EXECUTION_START =
Core framework events
"flow.execution.start"- FLOW_EXECUTION_END =
"flow.execution.end"- FLOW_EXECUTION_ERROR =
"flow.execution.error"- CONTEXT_CREATED =
Context events
"context.created"- SESSION_CREATED =
Session events
"session.created"- SESSION_DESTROYED =
"session.destroyed"- SESSION_DATA_GET =
"session.data.get"- SESSION_DATA_SET =
"session.data.set"- SESSION_CACHE_HIT =
"session.cache.hit"- SESSION_CACHE_MISS =
"session.cache.miss"- MESSAGE_RECEIVED =
Platform-agnostic messaging events Gateway/platform information is included in the payload
"message.received"- MESSAGE_SENT =
"message.sent"- MESSAGE_DELIVERY_FAILED =
A reply the flow produced that the platform would not take. Carries what its gateway gives MESSAGE_SENT, plus the error, so a subscriber sees the same send it would have seen succeed.
"message.delivery_failed"- MESSAGE_STATUS =
A platform's own report of what became of a message we sent. Informational: the send already succeeded or failed at the API call.
"message.status"- WEBHOOK_VERIFIED =
"webhook.verified"- WEBHOOK_FAILED =
"webhook.failed"- API_REQUEST =
"api.request"- MEDIA_UPLOAD =
"media.upload"- API_ERROR =
"api.error"- PAGINATION_TRIGGERED =
"pagination.triggered"- MIDDLEWARE_BEFORE =
Middleware events
"middleware.before"- MIDDLEWARE_AFTER =
"middleware.after"- WEBHOOK_RECEIVED =
A webhook this gateway verified but does not model, handed on whole.
FlowChat's job is messaging: inbound turns, the replies they produce, and what became of them. A platform sends far more than that, and what an account ban, a contact sync or an imported history means belongs to the application, not here. Rather than grow a handler per field, the payload is published with the field that named it, for an application to dispatch on.
"webhook.received"- CONVERSATION_ASSIGNED =
Conversation management events (for Intercom and similar platforms)
"conversation.assigned"- CONVERSATION_TAGGED =
"conversation.tagged"- CONVERSATION_STATE_CHANGED =
"conversation.state_changed"