Which "group" you are looking for
| Staff team | Customer group | |
|---|---|---|
| Who is in it | People who run the shop | People who buy from the shop |
| They sign in to | The merchant dashboard | The storefront, as shoppers |
| Controls | What they may do | What they pay |
| Operations | myStaff, inviteStaff, removeStaff | myCustomerGroups, and the ones below |
What a group carries
- code — a lowercase slug, normalized on creation and immutable afterwards. This is the stable key to use in your own systems and in imports; the names are not.
- nameEn and nameAr — both, because the merchant sees this group in whichever language they work in.
- minOrderValue — the smallest order the group may place, in base-currency minor units. Zero means no minimum.
- requiresApproval — when true, this group’s orders cannot ship until the merchant approves them.
- memberCount — how many of THIS store’s customers are in it.
Price bands
A band answers one question: what does this group pay for this variant, at this quantity or above. A band with a minimum quantity of 1 is simply the group’s everyday price; add more bands to build a quantity ladder.
# The store's customer groups, with member counts
query { myCustomerGroups { id code nameEn nameAr memberCount minOrderValue requiresApproval } }
# Create one. `code` is normalized to a slug and is immutable afterwards.
mutation {
createMyCustomerGroup(input: {
code: "wholesale", nameEn: "Wholesale", nameAr: "الجملة",
minOrderValue: 50000, requiresApproval: true
}) { id code }
}
# Put buyers in it
mutation { addCustomersToMyGroup(groupId: "7", customerIds: ["101", "102"]) }
# Set what the group pays for a variant from a given quantity up
mutation {
setMyWholesalePrice(input: {
groupId: "7", variantId: "913", minQuantity: 12, price: 42000
}) { id minQuantity price retailPrice }
}Plan gating and isolation
B2B groups are a paid-plan feature. On a plan without them `myCustomerGroups` returns an empty list rather than an error, so treat "no groups" as a normal state and not as a failure to retry.
Groups belong to one store, and so do their members and price bands. A customer id from another store cannot be added to your group; the server rejects it.