Send an event to Webchat
customPayload
with anything you like.Add a Custom Trigger
{{event.payload}}
. This will capture the most recent event you send.Test your trigger
Add the useWebchat hook
useWebchat
hook and destructure the client
object:clientId
with your bot’s actual client ID.Send an event to Webchat
client
instance to send an event to Webchat. First, define a payload object with any data you’d like. For example:client.sendEvent(customPayload)
. For example, in a button:Add a Custom Trigger
{{event.payload}}
. This will capture the most recent event you send.Test your Custom Trigger