Customer groups
Customer groups can be used to group and segment your customers. For example you could organise your customers by their tier “Free”, “Growth, “Enterprise” or make use of groups to keep track of customers trialing beta features.
Customers can belong to one or many groups. You can filter customer threads by group, allowing you to quickly focus on a subset of them.
This guide will show you how to add customers to groups using the API. You can also do this with the UI in Plain if you prefer.
This guide assumes you’ve already created some customer groups in Settings → Customer Groups.
Add a customer to groups
A customer can be added to a customer group using the addCustomerToCustomerGroup
mutation.
Depending on what your customer groups are you may want to call this API at different times. For example if you are grouping them by their pricing tier you will want to do this every time their tier changes.
This operation requires the following permissions:
customer:create
customer:edit
Running the above would console.log:
Remove a customer from groups
A customer can be removed from a customer group by using the removeCustomerFromGroup
mutation.
Which if successful will console.log null
Was this page helpful?