Set customer company role
set_customer_company_roleAssign a customer an admin or buyer role in their current company to control order visibility; admin sees all company orders, buyer only their own.
Instructions
Give a customer a company role in the company they belong to now. Roles come from the workspace's catalogue; v1 has two: 'admin' sees every order placed for the company, 'buyer' (the default) only their own. The role holds only while the customer stays in that company - moved to another, they are buyer there. Refused when the customer has no company, and for a key outside the catalogue. Returns the customer with companyRole as the effective role.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>",
"role": "<role>"
},
"name": "set_customer_company_role"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The customer's id (from list_customers) | |
| role | Yes | A role key from the workspace's company role catalogue - v1: 'admin' or 'buyer' |