A contact is a user that can interact with the chatbot, phone AI or email AI, a single contact might have multiple conversations across different channels.
We have a simple public API that allows you to manage contacts in your organization, you can use the API to create a contact or to authenticate a contact.
Whenever you embed the copilot widget in your application, you can use the widget options to create a contact, read more about this option in the widget documentation.
You can add any custom data you want to associate with the contact. This data will be returned in the response and can be used for any purpose you want, just make sure it’s a valid JSON string object.
The custom data is just a simple JSON object, you can add any key-value pairs you want to it, for example:
Copy
const widgetOptions = { initialMessage: "Hello! How can I help you?", token: "your_copilot_token_goes_here", user: { data: { name: "your_user_name", email: "your_user_email", customData: { // any custom data you want to send to the copilot backend "key1": "value1", "balance": 100, "age": 25, } } },
You can use the API or the widget to add custom data to a contact.