@_solaris/messenger-widget 0.4.9 → 0.4.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -56,12 +56,16 @@ import {
56
56
  userHash: '…', // HMAC-SHA256(secret, userId), computed server-side
57
57
  displayMode: 'floating',// 'floating' | 'sheet' | 'embedded'
58
58
  language: 'en', // optional — 'fr' | 'en'; else customer.language / widget.default_language
59
- context: { // optional agent context
60
- customer: { // pushed once to PATCH /customers/me
61
- name: 'Jane Doe', // so the agent has it as context
59
+ // Optional agent context. `context.customer` is a flat object pushed
60
+ // once to PATCH /customers/me on boot so the agent has it as context.
61
+ // `name`/`email` map to the customer's columns; any other key is a
62
+ // named variable value (server keeps variables you don't pass):
63
+ context: {
64
+ customer: {
65
+ name: 'Jane Doe',
62
66
  email: 'jane@acme.io',
63
- plan: 'pro', // any extra key → named variable (values)
64
- seats: 12, // server keeps variables you don't pass
67
+ plan: 'pro',
68
+ seats: 12,
65
69
  },
66
70
  },
67
71
  });