Mutation
mutation CreateCustomerGroup($input: CreateCustomerGroupInput!) {
createCustomerGroup(input: $input) {
customerGroup {
id
name
key
color
externalId
createdAt {
unixTimestamp
iso8601
}
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"name": "string",
"key": "string",
"color": "string"
}
}Response
{
"data": {
"createCustomerGroup": {
"customerGroup": {
"id": "id",
"name": "string",
"key": "string",
"color": "string",
"externalId": "string",
"createdAt": {
"unixTimestamp": "string",
"iso8601": "string"
}
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Mutations
createCustomerGroup
Create a new customer group with a unique key, display name, and color. Use upsertCustomerGroup instead if you need idempotent create-or-update behaviour. Requires customerGroup:create permission.
MUTATION
createCustomerGroup(input: CreateCustomerGroupInput!): CreateCustomerGroupOutput!Arguments
input
required
Returns
customerGroup
error
Mutation
mutation CreateCustomerGroup($input: CreateCustomerGroupInput!) {
createCustomerGroup(input: $input) {
customerGroup {
id
name
key
color
externalId
createdAt {
unixTimestamp
iso8601
}
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"name": "string",
"key": "string",
"color": "string"
}
}Response
{
"data": {
"createCustomerGroup": {
"customerGroup": {
"id": "id",
"name": "string",
"key": "string",
"color": "string",
"externalId": "string",
"createdAt": {
"unixTimestamp": "string",
"iso8601": "string"
}
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Was this page helpful?

