Skip to content

businessUnitAssociateRolesUpdate

Mutationin Business units

Update associate roles for an existing associate in the business unit Note: All current roles will be replaced with the provided roles

Arguments

ArgumentTypeDescription
businessUnitIdID!
customerIdID!
roleIds[ID!]!

Returns

BusinessUnitAssociateRolesUpdateResponse!

FieldTypeDescription
businessUnitBusinessUnitUpdated business unit information with modified associate roles
businessUnitErrors[BusinessUnitAssociateRolesUpdateError!]Error details if associate roles update failed

Example

mutation {
businessUnitAssociateRolesUpdate(
businessUnitId: "bu-123"
customerId: "customer-456"
roleIds: ["role-buyer", "role-viewer"]
) {
businessUnit {
id
associates {
items {
id
email
roles {
id
name
}
}
}
}
businessUnitErrors {
... on ValidationError {
message
}
}
}
}

The query is the example the schema documents. The response shows its shape with placeholder values.

Served by

@evolve-framework/commercetoolsResolved
@evolve-framework/medusaResolved
@evolve-framework/sfccStub: answers Not implemented

Used by

The storefront packages that send it, in these GraphQL documents: