Augeo AI Docs
SDKsEvents

Event envelope

Event envelope

Every upward fact uses the compact augeo.event envelope. Gate listeners on spec and specversion.

Deduplicate deliveries on event.id.

Prerequisites

ItemRequirement
Personaloyalty-concierge only
Bundle globalwindow.AugeoChatSdkLoyaltyConcierge
Event nameaugeo.event (AUGEO_EVENT)

Read Events before you parse fields. Load the production loyalty bundle first.

Transport

The widget dispatches a bubbling composed CustomEvent named augeo.event. The envelope is event.detail.

subscribeAugeoEvents drops details that fail the compact envelope predicate.

const { AUGEO_EVENT, subscribeAugeoEvents, isAugeoEventEnvelope } =
  window.AugeoChatSdkLoyaltyConcierge;

subscribeAugeoEvents(document, (event) => {
  routeByType(event);
});

document.addEventListener(AUGEO_EVENT, (e) => {
  const event = e.detail;
  if (!isAugeoEventEnvelope(event)) return;
  routeByType(event);
});

Root fields

FieldRequiredMeaning
specyesConstant augeo.event
specversionyesConstant 1.0
idyesUnique emission id
typeyesDictionary event name
typeversionyesPayload version for this type
timeyesEmission time in epoch milliseconds
classyesobserved or measured
sourceyes{ surface, instanceId }
subjectnoOptional subject of the event
gestureKeynoOptional stable key for one member gesture
correlationyesOptional join keys. Object may be empty
datayes{ occurrence, context }

class is observed for a direct fact. measured marks a derivation.

Measured siblings mint a new id. They set correlation.causationId to the source id.

Source

FieldRequiredMeaning
source.surfaceyesOriginating UI surface
source.instanceIdyesInstance id of that surface

Correlation

All correlation values are optional strings. Omit empty values.

FieldMeaning
conversationIdActive conversation or thread
turnIdTurn inside the conversation
slotIdInteraction slot
effectIdEffect waiting for a host ack
interactionIdInteraction for this gesture
causationIdId of the causing event

Join acks on envelope id, not on these keys. See Acknowledgements.

Data

FieldRequiredMeaning
data.occurrenceyesType-specific fields. See Event catalog
data.contextyesShared context bags. Object may be empty

Example

{
  spec: 'augeo.event',
  specversion: '1.0',
  id: 'evt_01hexample',
  type: 'com.augeo.conversation.message.sent',
  typeversion: 1,
  time: 1735689600000,
  class: 'observed',
  source: { surface: 'chatsdk', instanceId: 'conversation' },
  correlation: {
    conversationId: 'thr_1',
    turnId: 'turn_1',
  },
  data: {
    occurrence: {
      messageId: 'msg_1',
      inputMethod: 'typed',
      charCount: 12,
    },
    context: {},
  },
}
  1. Gate on spec augeo.event and specversion 1.0.
  2. Deduplicate on id.
  3. Switch on type before you read data.occurrence.
  4. Inspect class and correlation.causationId for measured siblings.
TopicPage
Handling rulesEvents
Names and occurrence fieldsEvent catalog
Host ack contractAcknowledgements
JSON schemaEvents v1
Public helpersAPI
Event capability optionsEvent options
Widget configurationConfiguration
Product scopeOverview