For TypeScript, the GraphQL SDK gives you a fully typed client for these operations.
Add a customer to groups
A customer can be added to a customer group using theaddCustomerToCustomerGroups mutation.
When to call this API depends on what your customer groups represent. If you group customers by pricing tier, call it every time their tier changes.
This operation requires the following permissions:
customerGroupMembership:create
Mutation
Variables
Variables
Response
Remove a customer from groups
A customer can be removed from a customer group by using theremoveCustomerFromCustomerGroups mutation.
This operation requires the following permissions:
customerGroupMembership:delete
Mutation
Variables
Response
Variables

