Mutation
mutation SetCustomerAccounts($input: SetCustomerAccountsInput!) {
setCustomerAccounts(input: $input) {
customer {
id
externalId
fullName
shortName
email {
email
isVerified
verifiedAt {
__typename
}
}
avatarUrl
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"customerIdentifier": {},
"accountIdentifiers": [
{}
]
}
}Response
{
"data": {
"setCustomerAccounts": {
"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
setCustomerAccounts
Replaces the full set of account memberships for a customer in a single call.
Any accounts not included in the input are removed; any new ones are added.
Use this when syncing account membership from your own system rather than tracking individual add/remove changes.
Requires the customer:edit, customerTenantMembership:create, and customerTenantMembership:delete permissions.
MUTATION
setCustomerAccounts(input: SetCustomerAccountsInput!): SetCustomerAccountsOutput!Arguments
input
required
Returns
customer
error
Mutation
mutation SetCustomerAccounts($input: SetCustomerAccountsInput!) {
setCustomerAccounts(input: $input) {
customer {
id
externalId
fullName
shortName
email {
email
isVerified
verifiedAt {
__typename
}
}
avatarUrl
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"customerIdentifier": {},
"accountIdentifiers": [
{}
]
}
}Response
{
"data": {
"setCustomerAccounts": {
"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?

