Mutation
mutation UpsertCustomerGroup($input: UpsertCustomerGroupInput!) {
upsertCustomerGroup(input: $input) {
customerGroup {
id
name
key
color
externalId
createdAt {
unixTimestamp
iso8601
}
}
result
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"identifier": {},
"name": "string",
"key": "string",
"color": "string"
}
}Response
{
"data": {
"upsertCustomerGroup": {
"customerGroup": {
"id": "id",
"name": "string",
"key": "string",
"color": "string",
"externalId": "string",
"createdAt": {
"unixTimestamp": "string",
"iso8601": "string"
}
},
"result": "UPDATED",
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Mutations
upsertCustomerGroup
Create or update a customer group identified by customerGroupId, customerGroupKey, or externalId. If a matching group is found it is updated and the result is UPDATED; if data is unchanged the result is NOOP; otherwise a new group is created and the result is CREATED. Note: using customerGroupId as the identifier returns an error if the group does not exist. Requires customerGroup:create and customerGroup:edit permissions.
MUTATION
upsertCustomerGroup(input: UpsertCustomerGroupInput!): UpsertCustomerGroupOutput!Arguments
input
required
Returns
customerGroup
result
error
Mutation
mutation UpsertCustomerGroup($input: UpsertCustomerGroupInput!) {
upsertCustomerGroup(input: $input) {
customerGroup {
id
name
key
color
externalId
createdAt {
unixTimestamp
iso8601
}
}
result
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"identifier": {},
"name": "string",
"key": "string",
"color": "string"
}
}Response
{
"data": {
"upsertCustomerGroup": {
"customerGroup": {
"id": "id",
"name": "string",
"key": "string",
"color": "string",
"externalId": "string",
"createdAt": {
"unixTimestamp": "string",
"iso8601": "string"
}
},
"result": "UPDATED",
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Was this page helpful?

