Mutation
mutation SetCustomerTenants($input: SetCustomerTenantsInput!) {
setCustomerTenants(input: $input) {
customer {
id
externalId
fullName
shortName
email {
email
isVerified
verifiedAt {
__typename
}
}
avatarUrl
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"customerIdentifier": {},
"tenantIdentifiers": [
{}
]
}
}Response
{
"data": {
"setCustomerTenants": {
"customer": {
"id": "id",
"externalId": "id",
"fullName": "string",
"shortName": "string",
"email": {
"email": "string",
"isVerified": true,
"verifiedAt": {
"__typename": "DateTime"
}
},
"avatarUrl": "string"
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Mutations
setCustomerTenants
Replaces the full set of tenant memberships for a customer in a single call.
Any tenants not included in the input are removed; any new ones are added.
Use this when syncing tenant membership from your own system rather than tracking individual add/remove changes.
Requires the customer:edit, customerTenantMembership:create, and customerTenantMembership:delete permissions.
MUTATION
setCustomerTenants(input: SetCustomerTenantsInput!): SetCustomerTenantsOutput!Arguments
input
required
Returns
customer
error
Mutation
mutation SetCustomerTenants($input: SetCustomerTenantsInput!) {
setCustomerTenants(input: $input) {
customer {
id
externalId
fullName
shortName
email {
email
isVerified
verifiedAt {
__typename
}
}
avatarUrl
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"customerIdentifier": {},
"tenantIdentifiers": [
{}
]
}
}Response
{
"data": {
"setCustomerTenants": {
"customer": {
"id": "id",
"externalId": "id",
"fullName": "string",
"shortName": "string",
"email": {
"email": "string",
"isVerified": true,
"verifiedAt": {
"__typename": "DateTime"
}
},
"avatarUrl": "string"
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Was this page helpful?

