c.l.cladDocs

Context, tags & custom fields

Attach page context, tags, and custom fields to conversations.

chat.setContext({ page: "billing", url: location.href, accountHealth: "red" });
chat.setConversationTags(["billing", "enterprise"]);
chat.setCustomFields({ plan: "enterprise", mrr: 25000, onboarding_complete: true });
  • Context is ephemeral and attached to future conversations/messages.
  • Tags and custom fields apply to new conversations (and future messages where supported); they are not retroactive.
  • Custom‑field keys should be slugs; values should be JSON primitives.

⚠️ Never put passwords, secrets, full card numbers, access tokens, or other sensitive data in metadata/customFields.