Mutation
mutation CreateCustomerEvent($input: CreateCustomerEventInput!) {
createCustomerEvent(input: $input) {
customerEvent {
id
customerId
title
components {
__typename
... on ComponentText {
__typename
}
}
isCollapsed
createdAt {
unixTimestamp
iso8601
}
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"customerIdentifier": {},
"title": "string",
"components": [
{}
]
}
}Response
{
"data": {
"createCustomerEvent": {
"customerEvent": {
"id": "id",
"customerId": "id",
"title": "string",
"components": [
{
"__typename": "ComponentText"
}
],
"isCollapsed": true,
"createdAt": {
"unixTimestamp": "string",
"iso8601": "string"
}
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Mutations
createCustomerEvent
Creates a customer event that appears in the timeline of every thread belonging to the customer.
Use this to surface important product activity (e.g. a failed payment, a deleted API key) so
your team has full context when helping the customer. The event layout is defined using Plain UI
components. Requires the customerEvent:create permission.
MUTATION
createCustomerEvent(input: CreateCustomerEventInput!): CreateCustomerEventOutput!Arguments
input
required
Returns
customerEvent
error
Mutation
mutation CreateCustomerEvent($input: CreateCustomerEventInput!) {
createCustomerEvent(input: $input) {
customerEvent {
id
customerId
title
components {
__typename
... on ComponentText {
__typename
}
}
isCollapsed
createdAt {
unixTimestamp
iso8601
}
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"customerIdentifier": {},
"title": "string",
"components": [
{}
]
}
}Response
{
"data": {
"createCustomerEvent": {
"customerEvent": {
"id": "id",
"customerId": "id",
"title": "string",
"components": [
{
"__typename": "ComponentText"
}
],
"isCollapsed": true,
"createdAt": {
"unixTimestamp": "string",
"iso8601": "string"
}
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Was this page helpful?

