Skip to main content
Human guide: task steps and agent prompt → Produce owner proposals from an ordered decision table, then compare them with labeled examples before enabling CRM writes. The policy below is fictional customer-authored logic; replace its territories and owners with your own.

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 synthetic pilot.csv uses a country code as its territory input:
In this example, eligibility has already been evaluated under the team’s qualification and suppression policy. Keep unknown eligibility distinct from 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:
These are example output fields, not a built-in routing response schema. Resolve identity before evaluating territory and retain unknown or conflicting evidence for review.

Inspect operations and run a proposal pilot

Inspect the returned contracts with 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.
Use the returned run ID and select a dataset path if several exist.

Apply the HubSpot variant

Search deepline 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.

Verify this task

Compare every row with the expected decisions above. Count proposed assignments, preserved owners, policy exceptions, and request failures separately.