Skip to main content
Customer events let you record something that happened in your own product against a customer, so it appears in the timeline of every thread that customer has.
For TypeScript, the GraphQL SDK gives you a fully typed client for these operations.
A customer event will be created in all threads that belong to the provided customer ID. If you want an event to appear in a specific thread use a thread event.
To create an event you need a customer ID. You can get this by upserting a customer in Plain, from data in webhooks or other API calls you made. If you want to test this, press + K on any thread and then “Copy customer ID” to get an ID you can experiment with. In this example we’ll be creating the following event:
Example event
For this you’ll need an API key with the following permissions:
  • customerEvent:create
Mutation
Variables