Augeo AI Docs
SDKsEvents

Events

Events

The loyalty widget emits compact member facts on augeo.event. Hosts answer effects with augeo.ack.

augeo.state is a resolver result. Hosts do not listen for it.

Cart and wishlist writes are recommend-only. The host composes its own mutations.

Product-page activation uses the existing contextual Chat API through a host-owned integration. Read Product-page handoff for private selection data and correlated outcomes.

Prerequisites

ItemRequirement
Host pageServes HTTPS and can load a third-party script
Personaloyalty-concierge only
Bundle globalwindow.AugeoChatSdkLoyaltyConcierge
MountSubscribe on document before you construct

Load a pinned production loyalty bundle first. See Quick start.

Constants

NameValueUse
AUGEO_EVENTaugeo.eventUpward CustomEvent from widget to host
AUGEO_ACK_EVENTaugeo.ackDownward CustomEvent from host to widget
Specaugeo.eventValue of spec on every compact envelope
Spec version1.0Value of specversion
Emission idUnique stringDeduplicate deliveries on event.id

Read constants from the loyalty IIFE global after the script loads.

Three contracts

DirectionNamespecRoleJoin
Upaugeo.eventaugeo.eventWidget emits observed and measured factsenvelope id
Downaugeo.ackaugeo.ackHost answers an effectack.eventId === event.id
Downaugeo.stateaugeo.stateResolver result for the cardeffectId or slotId

augeo.event and augeo.ack are bubbling composed CustomEvent objects. Read the payload from event.detail.

augeo.state is not a CustomEvent. After an ack or timeout the widget applies pending, confirmed, rejected, or unacknowledged.

Handling rules

RuleDetail
DeduplicateUse event.id
Join acksSet ack.eventId to event.id
Host outcomesSend fulfilled or rejected only
UnacknowledgedThe waiting layer mints this locally
First settlementThe first valid ack wins
Recommend-onlyHost composes cart and wishlist mutations

Do not send outcome.status of unacknowledged. The widget mints that after timeout.

Subscribe

Prefer subscribeAugeoEvents from the loyalty global. A raw document listener also works.

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

const unsubscribe = subscribeAugeoEvents(document, (event) => {
  handleFact(event);
});

document.addEventListener(AUGEO_EVENT, (e) => {
  const event = e.detail;
  if (!isAugeoEventEnvelope(event)) return;
  handleFact(event);
});
  1. Load the pinned production loyalty bundle.
  2. Subscribe on document so composed events reach you.
  3. Drop details that fail isAugeoEventEnvelope.
  4. Deduplicate deliveries on event.id.
  5. Construct the assistant after the listener is attached.

Call the returned unsubscribe function when the host page tears down.

TopicPage
Compact field listEvent envelope
Names this widget emitsEvent catalog
Host ack contractAcknowledgements
Event capability optionsEvent options
Destination writersAnalytics
JSON schemaEvents v1
Public helpersAPI
Widget configurationConfiguration
Product scopeOverview