HarborCRM Handoff
Quick Start
When the task asks you to audit, reconcile, prepare, or prospect against HarborCRM data for an event, trade show, or import batch:
- Read the answer template at
input/payloads/answer_template.jsonfirst -- it is the authoritative output schema. - Fetch every API endpoint the prompt references. Use parallel GET requests whenever possible.
- Cross-reference all fetched data: events to sponsors, badges to CRM accounts and contacts, exhibitors to CRM and meeting-interest records, raw contacts to suppression lists and CRM.
- Apply the classification, normalization, deduplication, and sorting rules below.
- Return exactly one JSON object matching the template. No markdown fences, no explanatory prose outside the JSON.
API
The runner supplies the base URL as <TASK_ENV_BASE_URL>. All endpoints are
read-only GET. Append paths directly:
<TASK_ENV_BASE_URL>/api/events.
Endpoint Inventory
Events
GET /api/events-- list all eventsGET /api/events/{event_id}-- single event detailGET /api/events/{event_id}/orders-- sponsor orders for the eventGET /api/events/{event_id}/badges-- badge scans for the eventGET /api/events/{event_id}/sponsor_packages-- sponsor package definitions
Finance
GET /api/finance/invoices?event_id={event_id}-- invoices for an event
CRM
GET /api/crm/accounts-- all CRM accountsGET /api/crm/accounts/{account_id}-- single CRM accountGET /api/crm/contacts-- all CRM contactsGET /api/crm/opportunities-- all CRM opportunitiesGET /api/crm/campaign_members-- all campaign members; filter with?event_id={event_id}
Trade Shows
GET /api/tradeshows-- list all trade showsGET /api/tradeshows/{show_id}-- single trade show detailGET /api/tradeshows/{show_id}/exhibitors-- exhibitors for a showGET /api/tradeshows/{show_id}/meeting_interest-- meeting interest records for a show
Import Batches
GET /api/import_batches-- list all import batchesGET /api/import_batches/{batch_id}-- single batch detailGET /api/import_batches/{batch_id}/raw_contacts-- raw contact rowsGET /api/import_batches/{batch_id}/suppression-- suppression-list entries for the batch
Policies
GET /api/policies-- policy metadata (qualification rules, opportunity amounts, date offsets)
Health
GET /healthGET /api/manifest
Fetch endpoints in parallel. Use API results as the sole source of truth; do not invent data.
Answer Templates
Every task provides a JSON answer template at
input/payloads/answer_template.json. Read it before fetching data.
The template declares:
- Every required top-level key.
- Field types and allowed enum values.
- Sort order for every list.
- Numeric precision (counts are integers, amounts are integers in USD).
- Whether a field is nullable or expects an empty string.
Conform to the template exactly. Do not add undeclared fields. Do not change key names. Match the declared sort order and enum values precisely.
Controlled Vocabularies
Sponsor Statuses
| Value | Meaning |
|---|---|
paid_deferred |
Invoice exists and is fully paid; revenue recognized |
open_invoice |
Invoice exists with a non-zero open balance |
proposal_only |
Sponsor package selected but no invoice generated |
not_sponsor |
Account has no sponsor order for the event |
Exclusion Reasons -- Attendee / Badge
| Value | Meaning |
|---|---|
sponsor_attendee |
Contact's company is a sponsor account |
inactive_sponsor_record |
Sponsor record is canceled or inactive |
non_business_badge |
Badge type is press, student, speaker-only, or similar |
existing_disqualified |
CRM account is already marked disqualified |
missing_contact |
No contact name on the badge or row |
duplicate |
Row is a duplicate of a winning row |
suppressed |
Contact matches a suppression-list entry |
Exclusion Reasons -- Trade-Show Exhibitor
| Value | Meaning |
|---|---|
distributor_only |
Exhibitor resells, does not OEM-build |
service_only |
Exhibitor provides services, not platforms |
sensor_vendor_only |
Sells sensors but does not build platform hardware |
research_only |
Academic or research institution |
not_target_market |
Market does not match the campaign scope |
CRM Actions -- Accounts
| Value | Meaning |
|---|---|
create_account |
No matching CRM account; create one |
update_existing |
Matching CRM account exists; update it |
no_import |
Do not import into CRM |
CRM Actions -- Contacts
| Value | Meaning |
|---|---|
create_contact |
No matching CRM contact; create one |
update_existing |
Matching CRM contact exists; update it |
CRM Actions -- Campaign Members
| Value | Meaning |
|---|---|
add_campaign_member / create |
Add a new campaign member record |
update_campaign_member / update |
Update an existing campaign member |
no_action |
Existing member needs no change |
no_import |
Do not create a campaign member record |
Platform Coverage
| Value | Meaning |
|---|---|
AUV |
Autonomous Underwater Vehicle |
ROV |
Remotely Operated Vehicle |
Underwater Camera |
Underwater imaging platform |
Sort platform lists in this enum order: AUV, ROV, Underwater Camera.
Priority Tiers
| Value | Meaning |
|---|---|
A |
Highest priority |
B |
Medium priority |
C |
Lower priority |
Source Names -- Import Batches
| Value |
|---|
badge_scan |
sponsor_form |
partner_upload |
webinar_form |
exhibitor_form |
manual_upload |
Relationship Types -- Exhibitors
| Value | Meaning |
|---|---|
distributor |
Reseller / dealer |
service_provider |
Services-only business |
sensor_vendor |
Sensor component vendor |
research |
Academic or research entity |
Campaign Member Target Statuses
| Value | Meaning |
|---|---|
attended |
Attended the event as a qualified lead |
attended_sponsor |
Attended the event as a sponsor |
registered_sponsor |
Registered but did not attend; sponsor |
excluded |
Excluded from campaign membership |
Cross-Referencing & Classification
Sponsor Determination (Event Reconciliation)
- Fetch event orders, sponsor packages, and invoices in parallel.
- For each sponsor order: locate the matching invoice (match on invoice ID from
the order or look up by account). If an invoice exists and its open balance
is zero, status is
paid_deferred. If an invoice exists with a positive open balance, status isopen_invoice. If no invoice exists, status isproposal_only. - Package amount comes from the order or sponsor package. Paid amount and open
balance come from the invoice. Revenue totals sum package amounts within each
status bucket.
open_invoice_balancesums only open balances. - Accounts with no sponsor order are
not_sponsorwhen that status is required.
Lead Qualification (Event Reconciliation)
- Fetch badge scans, CRM accounts, CRM contacts, and campaign members in parallel.
- Build lookup maps: CRM accounts by name (case-insensitive) and by ID; CRM contacts by normalized email.
- Classify each badge:
- Company matches a sponsor account →
sponsor_attendee, CRM actionno_action. - Badge type is non-business →
non_business_badge, CRM actionno_import. - Company matches a disqualified CRM account →
existing_disqualified, CRM actionno_import. - Contact name is missing →
missing_contact, CRM actionno_import. - Otherwise →
qualified_non_sponsor_lead.
- Company matches a sponsor account →
- For each qualified lead, determine CRM actions:
- If a CRM account exists for the company →
update_existing; otherwisecreate_account. - If a CRM contact exists with the same normalized email →
update_existing; otherwisecreate_contact. - Campaign member:
add_campaign_member.
- If a CRM account exists for the company →
- Use the event's lead opportunity amount (from policy or event metadata) for each qualified non-sponsor account.
Campaign Member Reconciliation
When the template requires campaign member action decisions:
- Existing campaign members tied to sponsors →
no_actionwith statusattended_sponsororregistered_sponsor. - Existing campaign members tied to qualified leads → decide
no_actionorupdatebased on whether their status needs correction. - New qualified leads not yet campaign members →
createwith statusattended. - Badge-only sponsor contacts (sponsor attendee not yet a campaign member) →
createwith statusattended_sponsor.
Trade-Show Exhibitor Qualification
- Fetch exhibitors, meeting interest, CRM accounts, and policies in parallel.
- Build a CRM account lookup by company name (case-insensitive) and by ID.
- Map meeting interest records to exhibitors by company ID; extract demo requests and interest scores.
- Classify each exhibitor:
- Relationship is
distributor→distributor_only, CRM actionno_import. - Relationship is
service_provider→service_only, CRM actionno_import. - Relationship is
sensor_vendor→sensor_only, CRM actionno_import. - Relationship is
research→research_only, CRM actionno_import. - Platforms do not match the campaign target →
not_target_market, CRM actionno_import. - Otherwise → qualified.
- Relationship is
- For each qualified exhibitor:
- If a CRM account exists →
update_existing; otherwisecreate_account. - Capture enrichment fields: booth, country, website.
- Record platform coverage using only the allowed platform enums.
- If a CRM account exists →
- When priority tiers are assigned:
A: demo requested AND interest score ≥ 90.B: demo requested AND interest score ≥ 80 (but not ≥ 90).C: all other qualified leads.
- When opportunity sizing by tier is required, check the policy or prompt for
per-tier amounts; otherwise use
A= $120,000,B= $90,000,C= $50,000 (integers, USD). - When rank-ordering is required, sort by: demo request first, then interest score descending, then platform count descending, then company name ascending.
Import Batch Processing
- Fetch raw contacts, suppression list, CRM accounts, CRM contacts, and policies in parallel.
- Normalize every email (see Normalization Rules below).
- Build a suppression lookup: normalize suppression-list emails and phones, then flag any raw contact whose normalized email or phone matches.
- Deduplicate by normalized email:
- Group rows sharing the same normalized email.
- Pick one winner per group. Prefer sources in this order:
badge_scan,sponsor_form,partner_upload,webinar_form,exhibitor_form,manual_upload. Within the same source, prefer the earliestcaptured_attimestamp. - Mark all other rows in the group as
duplicate.
- Classify each cleaned row:
- Suppressed →
suppress. - Missing contact name →
missing_contact, CRM actionno_import. - Otherwise inspect CRM:
- CRM account exists →
update_existing. - No CRM account →
create_account.
- CRM account exists →
- Suppressed →
- The campaign member import count is the number of cleaned rows whose CRM
action is
create_accountorupdate_existing.
Normalization Rules
- Lowercase the entire string.
- Trim leading and trailing whitespace.
- If no email is present, output
""(empty string).
Phone
- Strip every non-digit character (spaces, dashes, parentheses, dots, plus signs).
- If no phone is present, output
""(empty string). - Preserve the numeric country code that follows
+.
Sorting Conventions
Always follow the template's explicit sort instructions. When the template is silent, use these defaults:
| List | Sort Key(s) | Direction |
|---|---|---|
| Sponsor statuses | account_name |
ascending, case-sensitive |
| Qualified lead accounts | account_name |
ascending, case-sensitive |
| Excluded records | company_name, then contact_name |
ascending |
| Badge decisions | badge_id |
ascending |
| Campaign member actions | subject_key |
ascending |
| Clean contacts | clean_contact_id |
ascending |
| Duplicate keys | key |
ascending |
| Removed rows | row_id |
ascending |
| Qualified exhibitors | when rank-ordered: rank ascending; otherwise company_name ascending |
|
| Excluded exhibitors | company_name |
ascending |
| Platforms within an item | enum order: AUV, ROV, Underwater Camera |
|
| CRM account ID lists | ascending string sort | |
| Account name lists | ascending string sort |
Follow-Up Dates
- Lead follow-up due date: 30 calendar days after the event end date.
- Sponsor finance follow-up due date: 14 calendar days after the event end date.
- If the policy endpoint or event metadata provides explicit dates, those take precedence over the default offsets.
- Format all dates as
YYYY-MM-DD.
Counts and Totals
- All counts are integers.
- Revenue and opportunity amounts are integers in USD. No decimal places, no currency symbols.
- Pipeline totals are the sum of individual opportunity amounts.
- Platform coverage counts: tally each qualified exhibitor's platforms. One exhibitor covering both AUV and ROV increments both counters.
- CRM action counts: count every record that receives each action.
- Sponsor finance task count: number of sponsor accounts requiring finance
follow-up (those with
open_invoiceorproposal_onlystatus). - Lead task count: number of qualified lead accounts.
Output Rules
- Return exactly one JSON object.
- No explanatory prose, markdown fences, or commentary outside the JSON.
- Do not add fields not declared in the answer template.
- All keys must match the template exactly, including case.
- Use
nullwhen the template showsnull; use""when the template shows an empty string. - Numeric values must match the template's declared type (integers where it says integer).
- Enum values must be drawn from the template's allowed-values list, exactly as spelled.
Workflow Sequence
- Read
input/payloads/answer_template.json. Internalize every required key, allowed enum, sort order, and type constraint. - Read
input/prompt.txt. Extract the entity identifier (event_id, show_id, or batch_id), the campaign context, and any task-specific overrides. - Fetch all API data the prompt references. Prefer parallel GET requests -- there is no write access, so order does not matter.
- Build lookup maps from the raw API responses: accounts by name and ID, contacts by normalized email, invoices by account, meeting interest by exhibitor ID, suppression entries by normalized email and phone.
- Apply the classification and cross-referencing logic for the task type (event, trade show, or import batch).
- Normalize every email and phone that enters the output.
- Sort every list according to the template's instructions.
- Fill the template, verify every key is present, and return the single JSON object.