StabisoDocs

Sales and customers

Sales teams and record owners

Every customer, contact, deal and activity has an owner: the person responsible for it. Sales people are grouped into sales teams, and each person sees either every sales record, their team's, or only their own. The rule is enforced by the server, so it holds on every screen, in the REST API and for AI assistants (MCP) alike. Decision record: ADR-0086.

Owners

Record Owner Default
Customer (party.owner_user_id) the account owner the person creating it; a vendor has none (422 vendor_no_owner)
Contact (crm_contact.owner_user_id) the person who looks after the contact the person creating it
Deal (crm_opportunity.owner_user_id) the deal owner the person creating it
Activity (crm_activity.owner_user_id) who did it (called, met, wrote) the person logging it; never changes

A key or an agent acts for the person behind it: a key belongs to the person who created it, an agent to the person who called it. A key the system issued has no person and owns nothing.

The Salesforce import keeps the owner each account, task, event and note had there, when that person is linked here; otherwise the person importing owns it.

Who sees what

Set per person under Settings › Sales teams (PUT /v1/people/{user_id}/record-visibility):

Level Sees
all (default) every sales record
team records owned by themselves or by anyone in one of their teams
own records they own

What "sees" means for each record:

  • Deals: owned by one of the people seen.
  • Customers: owned by one of the people seen, or with a deal owned by one of them (a deal shows its customer). A customer not seen answers 404, as if it did not exist; lists and search leave it out. Vendors are not sales records: everyone with the right to read sees them.
  • Contacts: owned by one of the people seen, or of a customer seen.
  • Activities: done by or assigned to one of the people seen, or on a deal seen, or (without a deal) on a customer seen.
  • Quotas and the sales reports count only the people and deals seen.

Someone who sees only their own or their team's records cannot give a record an owner outside that view (422 owner_outside_view); the database refuses it too. Lists of deals, contacts and customers take owner_user_id to filter by owner.

Finance documents (quotes, orders, invoices, payments) and the ledger are not sales records: rights (scopes) govern them as before, so the books always add up whoever looks. The organization export and mailbox capture run for the whole organization.

The sales lists show a note to a person who does not see every record, naming whose they see (GET /v1/me/record-access).

Teams

GET, POST /v1/sales-teams, PATCH and DELETE /v1/sales-teams/{team_id}, PUT and DELETE /v1/sales-teams/{team_id}/members/{user_id}. A person may be in several teams. Removing a team or a person from it changes nobody's records, only what team people see. Administrators manage teams; every change is audited.

Handing records over

When someone leaves or changes territory, Hand over records (POST /v1/record-access/hand-over) gives every customer, contact and deal one person owns to another, in one company or all. Each record's history shows the change. Activities stay with who did them and open tasks keep their assignee; the answer says how many open tasks are left with the previous owner. Only an administrator who sees every record hands over (403 hand_over_needs_all_records), and never to a disabled person (422 owner_disabled).

Stabiso, the Enterprise System of Record · generated from the code and its guides · release 20b7dd5b0c4d