businessUnitAssociateRolesUpdate
Update associate roles for an existing associate in the business unit Note: All current roles will be replaced with the provided roles
Arguments
| Argument | Type | Description |
|---|---|---|
businessUnitId | ID! | |
customerId | ID! | |
roleIds | [ID!]! |
Returns
BusinessUnitAssociateRolesUpdateResponse!
| Field | Type | Description |
|---|---|---|
businessUnit | BusinessUnit | Updated 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 } } }}{ "data": { "businessUnitAssociateRolesUpdate": { "businessUnit": { "id": "id-1", "associates": { "items": [ { "id": "id-1", "email": "jane@example.com", "roles": [ { "id": "id-1", "name": "Example" } ] } ] } }, "businessUnitErrors": [ { "message": "Example" } ] } }}The query is the example the schema documents. The response shows its shape with placeholder values.
Served by
| @evolve-framework/commercetools | Resolved |
| @evolve-framework/medusa | Resolved |
| @evolve-framework/sfcc | Stub: answers Not implemented |
Used by
The storefront packages that send it, in these GraphQL documents:
- @evolve-storefront/feature-organization:
BusinessUnitAssociateRolesUpdate

