LLMs.txt: Complete documentation index for AI agents
CustomActionEventPayload

CustomActionEventPayload

`CustomActionEventPayload : `

Payload delivered to on(EmbedEvent.CustomAction). Beyond the wire fields, the SDK attaches an AnswerService built from the event’s session and answer data (see utils/processData.ts processCustomAction) — annotate your callback with this type to access it:

embed.on(EmbedEvent.CustomAction, (payload: CustomActionEventPayload) => {
  if (payload.data.id === 'my-action') {
    payload.answerService?.getUnderlyingDataForPoint([]);
  }
});

It is a dedicated type rather than folded into `on()’s generic callback because the SDK’s event registry types callbacks as the plain MessagePayload, which the enrichment cannot be intersected into without restructuring that registry.

© 2026 ThoughtSpot Inc. All Rights Reserved.