Skip to Content
Heuristic documentation

manage_crm

Changes data

Connect and disconnect a product's CRM accounts, and choose where their ARR comes from (product Owners).

Set action to one of these:

  • connect (needs productId, connectorId): Connect a CRM account to the product. Answers the CRM's install URL, valid 10 minutes and once: the person opens it in a browser, chooses an account and approves; Heuristic then connects it and syncs its feedback (check with read_crm action connections). One connection per CRM: refused while one exists; disconnect it first.
  • disconnect (needs productId, connectionId): Disconnect a CRM account: syncing stops at once; feedback it synced stays. Connecting again needs the person to approve in the CRM. This can't be undone, so Heuristic asks the person first (see confirm).
  • set_arr_field (needs productId, connectionId, body): Choose what a connection reads ARR from: a name from read_crm with action arr_fields, won deals' ARR (standard: true, the default) or a company number field (when the team keeps ARR on the company or enters renewals as new won deals). Null reads no ARR from the CRM; companies keep the ARR they have. After a change to won deals or a field, every company the connection supplied gets its ARR again at the next sync; won deals' ARR needs no read of the CRM. Repeating the same request changes nothing, so a retry is safe.

Actions (set action)

connect

Who can use it
Admins and the product's Owners
Hints
Changes dataReaches outside Heuristic
Runs
connect_hubspot
Inputs
  • productId string, required

    From read_product with action list or get_me.

  • connectorId string, required

    The CRM's id, from read_crm with action connectors.

    Allowed values: hubspot

disconnect

Who can use it
Admins and the product's Owners
Hints
Changes dataCan remove dataAsks the person to confirm
Runs
disconnect_crm_connection
Inputs
  • productId string, required

    From read_product with action list or get_me.

  • connectionId string, required

    The CRM connection's id, from read_crm with action connections.

  • confirm boolean

    True only after the person said yes to the question a first call answered with confirmation_required. Ignored when your app can show the person questions: Heuristic then asks them itself.

set_arr_field

Who can use it
Admins and the product's Owners
Hints
Changes dataSafe to repeat
Runs
set_arr_field
Inputs
  • productId string, required

    From read_product with action list or get_me.

  • connectionId string, required

    The CRM connection's id, from read_crm with action connections.

  • body object, required

    The field to read ARR from.

    • name string or null, required

      A name from read_crm with action arr_fields: won deals' ARR (standard: true, the default) or a company number field; or null to read no ARR from the CRM.