Prerequisites

  • An active Chatbase subscription
  • User data ready for upload
  • Access to implement user identification
1

Upload User Data

Use the Contacts API endpoint to upload your user data, and assign an external_id to the user. This external_id should be used to identify the user in future conversations.

This external_id should match the user_id you use in your user identification step. Also, the data associated with the external_id will not be used if the user_hash verification fails. So you don’t need to worry about data privacy.

2

Create Custom Actions

Create custom actions from the dashboard that utilize contact data by referencing fields under the contact. key:

3

Implement User Identification

Add the identification script to your website and use one of our user identification methods.

For user verification implementation details, see our Identity Verification Guide.

Security Considerations

  • User data is only accessible through custom actions that explicitly reference contact fields
  • User verification is required to access contact data

Best Practices

  1. Data Minimization: Only upload necessary user data that will be used in chatbot interactions

  2. Regular Updates: Keep contact data current by updating it when user information changes

  3. Error Handling: Implement proper error handling for cases where contact data might be unavailable

  4. Testing: Thoroughly test custom actions that use contact data before deploying to production

Implementation Details

For more details on the Contacts API, see the Contacts API guide.