Prepare the input and owner map
Use stable event and lead IDs plus the resolved CRM contact and company identity. Only accepted evidence should supply routing inputs. A failed lookup is an operational error, not an ineligible lead. This syntheticpilot.csv uses a country code as its territory input:
false.
Set the owner map to US → owner-us and GB → owner-gb. These are synthetic policy identifiers, not CRM owner IDs.
Apply the first matching rule
Under this table,
evt-1 proposes owner-us; evt-2 proposes owner-gb; evt-3 is held for missing territory; evt-4 preserves owner-strategic; evt-5 is held for identity review; evt-6 receives no assignment; and evt-7 is held because CA has no mapping. Add fixtures for unknown eligibility, overlapping territories, and a removed owner.
Return the evidence used, policy version, prior owner, proposed owner, and reason. For example:
Inspect operations and run a proposal pilot
deepline describe <returned-id> --json. Author inbound-lead-routing.play.ts from the table and owner map; Build a Play covers source validation. Keep CRM writes disabled.
Prepare authorized pilot.csv rows with CSV input. Review the source and expected Deepline usage before execution.
Apply the HubSpot variant
Searchdeepline search "HubSpot contacts owners properties" --type tools,prebuilts --json and inspect the returned contracts. Resolve the existing contact ID, inspect property internal names and types, and read the available owners through supported actions.
Map each policy owner to a verified HubSpot owner ID. For example, owner-us → 12345 is valid only if 12345 is an available owner in the target account. Confirm that the chosen update action accepts the hubspot_owner_id property and its value type. An owner name, email, or team label is not a substitute for the required ID. If the mapping is missing or invalid, hold the proposal.
Before an approved write, re-read the current owner and apply the protected-owner rule again. Submit only the authorized property, then read the contact back. Repeated events must reconcile the same intended assignment; a timeout after submission needs destination reconciliation before another attempt. Repair CRM records covers field precedence, evidence records, and uncertain writes.