What matters here
- Protect deals past a stage. A relationship mid-negotiation is worth more than a tidy territory map.
- Apply on the effective date. A plan entered in December for January should not move anything in December.
- Model coverage before sign-off. An uncovered segment discovered in February is a quarter lost.
- Keep the history. Commission is calculated against the plan as it was, not as it is.
- Report accounts with no owner after every change. That list should be empty and rarely is.
Who this is for
You run revenue operations or sales operations. The plan changes annually, it is applied by hand or by a script somebody wrote once, and the first month afterwards is spent fixing ownership.
How it works in practice
The sequence, from a plan being agreed to the field working to it.
- 1
The plan is modeled before it is approved
Coverage, balance and quota against historical performance, so gaps are visible while they can still change.
- 2
Accounts are assigned by rule, not by list
Segment, geography and industry from data, so the plan survives an account changing shape.
- 3
Application waits for the effective date
Entered whenever, applied on the first, so nothing moves early.
- 4
In-flight deals keep their owner
Past a stage, the deal and the relationship stay put regardless of the new map.
- 5
Everybody is told what changed and why
Reps, managers and customer success, before the date rather than on it.
- 6
The old plan is retained
Because commission for the previous period is calculated against it.
What territory sync is made of
Four, and the third is the one that protects revenue.
Modeled coverage
Accounts, pipeline and quota per territory against historical attainment, run before sign-off rather than discovered afterwards.
Rule-based assignment
Territories defined as rules over account attributes, so an account changing segment is handled rather than requiring a manual move.
In-flight protection
Deals past a stage keep their owner. The map can wait; the negotiation cannot.
Retained history
Ownership as of a date, because commission and attainment are both calculated against the plan that was in force.
The Tray Headless prompts
Paste these into Claude Code or Codex with the Tray Headless plugin installed. Each stage runs on its own. The systems named in them are the worked example rather than a requirement, and every prompt says so.
Once per project, run /tray-workflows:set-workspace to pick the workspace
these build in. Point it at a sandbox first.
Begin by modeling coverage before anything changes
A gap found in February is a quarter lost.
- build-workflow
- tray-patterns
Use build-workflow. The systems in play are Salesforce and Snowflake, or whatever we run in those seats.
Before applying any plan, model it: for each proposed territory, the account count, total addressable spend, current pipeline, historical closed revenue, and the quota proposed against it.
Then show me coverage multiple per territory, and flag any that is far above or below the others, plus any segment with no owner at all.
An uncovered segment discovered in February has cost a quarter. The same gap seen in a model in November is a five minute conversation.
Define territories as rules, not lists
So an account changing shape does not require a manual move.
- build-workflow
Use build-workflow. Express each territory as a rule over account attributes: country, region, employee band, industry, and named account list where one genuinely applies.
Rules evaluate in a fixed order and stop at first match, exactly as lead routing does, so an account can never belong to two territories.
Named accounts are the exception, not the mechanism. A plan made entirely of named lists needs manual maintenance every time a company grows, and nobody does that maintenance.
Show me every account that matches no rule. That list is the plan gap and it is never empty on the first run.
Apply on the effective date, and protect what is in flight
A relationship mid-negotiation is worth more than a tidy map.
Apply the plan on its effective date, not when it was entered. A plan agreed in December for January changes nothing in December.
Then protect in-flight work. Any opportunity past a stage I set, or with activity in the last fortnight, keeps its current owner through the change, with an end date on that protection.
Reassigning a deal in negotiation because the territory map changed is how a deal is lost. The new owner has no history, the customer has to start again, and the outgoing rep has no reason to help.
Show me the protected list before applying, so somebody can decide on the exceptions instead of discovering them.
Tell everybody before the date
Because the first they hear should not be a missing account.
- tray-gotchas
Use tray-gotchas, then communicate before the effective date, not on it:
Each rep: which accounts they gain, which they lose, and which they
keep because a deal is in flight
Each manager: their team's coverage and quota
Customer success: which of their accounts changed owner, so the next
customer conversation is not confused
Handle these: an account in an active support escalation, which should flag rather than move silently; a customer whose champion has a personal relationship with the outgoing rep, which is a judgment rather than a rule; and a mid-year change, which needs prorating for quota and commission.
Keep the history, and check for orphans
Commission is calculated against the plan as it was.
Store ownership as history with valid-from and valid-to, not as a current field. Commission and attainment for a past period are calculated against the plan that was in force then, and a current owner field cannot answer that.
After every change, report:
Accounts with no owner, which should be zero
Accounts owned by somebody who has left
Opportunities whose owner no longer owns the account
Territories with no rep assigned
Coverage multiple per territory after the change
Run those the day after application, not a month later. Every one of them is a gap somebody is not working.
Test it, then hand the rules to RevOps
Because territories change more than annually in practice.
Run the per-step schema checks and the whole-workflow audit before this touches production. Run the whole plan in preview first and have sales leadership read the movement list.
Then open the same workflow in Tray Build so revenue operations can amend territory rules, protection thresholds and effective dates in the visual canvas.
What it connects to
The plan is a model, the CRM is where it lands, and everybody affected needs telling.
-
Salesforce Read accounts, opportunities and current ownership, then apply the new assignment on the effective date. Reads and writes
-
Snowflake Model coverage and historical attainment, and hold ownership history for commission calculation. Reads and writes -
Workday Read who is in seat, their start date and ramp, so a territory is not assigned to somebody who has not joined. Reads -
Slack Tell each rep what they gain and lose before the date, and post the coverage model to leadership. Writes
-
Looker Publish coverage and balance where sales leadership already reviews the plan. Writes
Named systems are the ones most teams run, not the only ones that work. Each is an authentication in your Tray workspace, referenced by name, so the workflow never holds a credential.
Same build, other stacks
The design does not change if you run something else in one of these seats. The same prompts build it against Microsoft Dynamics 365, Google BigQuery, Microsoft Teams, SAP SuccessFactors, Power BI or HubSpot.
Connections in this build
Field mapping, templates and common problems for each pairing: Snowflake + Salesforce, Workday REST + Salesforce, Salesforce + Slack and Workday REST + Slack.
Running it in production
This moves revenue responsibility between people. Getting it wrong is felt for a quarter.
- 1
It runs on the platform, not on somebody's machine
Application fires on the effective date, months after the plan was entered, with the protection list evaluated at that moment, not when it was written.
- 2
Ownership is stored as history
Valid-from and valid-to per assignment. Commission for a past period is calculated against the plan in force then, and a current field cannot answer that.
- 3
Credentials are managed, never in code
Mass reassignment of account ownership is among the most disruptive writes available in a CRM. Scoped, in your workspace, and separately rotatable.
- 4
RevOps own the rules
Territory rules, protection thresholds and effective dates open in Tray Build, because territories change more often than annually in practice.
- 5
Preview before applying
The movement list read by sales leadership before anything changes. This is the one change where an error affects every rep at once.
Build it as an app with Tray Helix
This moves the data between systems. It does not give anybody a screen to work in. Build that app in Claude Code, Codex or Cursor, then deploy and run it governed on Tray Helix. Same kind of guide, same kind of prompts.