Flow · 7 steps
Pay reps commission
Setting up what reps earn: when commission is earned and by whom, a commission group with its base rate, a rep in it, a catalog's own rate for one SKU and that group, and the catalogs the group's reps sell from. Every order snapshots the terms it is placed under, so a later change moves only orders placed after it.
Services involved
A filled dot is a read; a ring is a call that changes something.
- Inventory Manager:
https://inventory.getmanifold.io
Every call carries Authorization: Bearer $MANIFOLD_TOKEN unless its step says otherwise
(getting a token). Run a flow in your sandbox, not your live
organization: see Before you start.
1 Say when and to whom commission is paid
One organization-wide setting: earned as each line is invoiced, and paid to the customer's account manager at placement. Saving the same settings again is acknowledged and appends nothing.
PUT /commissions/settings Inventory Manager
{
"earnedOn": "invoiced",
"earner": "account-manager"
}What the answer holds: the operation's example.
Records inventory.commission-settings-saved.
2 Open the wholesale catalog
Commission rules and rep access are a catalog's, so the walk opens one of its own.
POST /catalogs Inventory Manager
{
"name": "Wholesale MUG-GOLD",
"currency": "AUD"
}Answers 201. What the answer holds: the operation's example.
From your answer, later steps send id as {catalogId}.
Records inventory.catalog-created.
3 Open a commission group
A group is a base rate in basis points and the catalogs its reps sell from — every catalog until those are set. The caller mints the cgr_ id, so a retry is the same group.
PUT /commission-groups/cgr_019e5a10-4c2a-7d11-9a3e-5b7c2d8e1f40 Inventory Manager
{
"name": "Gold MUG-GOLD",
"baseRateBps": 500
}What the answer holds: the operation's example.
Records inventory.commission-group-saved.
4 Put a rep in it
Every member is in exactly one group — default until put in another.
PUT /commission-members/usr_019e5a10-51b0-7a42-8c1d-0e9f3a6b2c71 Inventory Manager
{
"groupId": "cgr_019e5a10-4c2a-7d11-9a3e-5b7c2d8e1f40"
}What the answer holds: the operation's example.
Records inventory.commission-member-assigned.
5 Give the SKU its own rate for the group
A catalog may make a SKU uncommissionable, or rate it per group; a group the rule does not name earns its base rate.
PUT /catalogs/{catalogId}/commission/MUG-GOLD Inventory Manager
{
"rule": {
"_tag": "rates",
"groups": [
{
"groupId": "cgr_019e5a10-4c2a-7d11-9a3e-5b7c2d8e1f40",
"rateBps": 800
}
]
}
}What the answer holds: the operation's example.
Records inventory.catalog-commission-set.
6 Let the group's reps sell from that catalog only
A rep bound by their group sees and sells from its catalogs alone; owners, admins and sales managers are not bound.
PUT /commission-groups/cgr_019e5a10-4c2a-7d11-9a3e-5b7c2d8e1f40/catalogs Inventory Manager
{
"catalogs": {
"_tag": "listed",
"catalogIds": [
"{catalogId}"
]
}
}What the answer holds: the operation's example.
Records inventory.commission-group-catalogs-set.
7 Read the catalog's rules
What the catalog says about each SKU, and the catalog it inherits the rest from.
GET /catalogs/{catalogId}/commission Inventory Manager
What the answer holds: the operation's example.
What a recorded fact is: Facts and the journal. Why a repeated step changes nothing: Idempotency and retries.