Preview Client Rule
Count the companies a draft client rule would select, without saving it
count can be a lower bound when the CRM stops counting early;
countIsLowerBound says so.
The rule, as Set Client Rule takes it.
Errors
Authorizations
The API key you created on the API settings page of the Clustr app.
Path Parameters
The CRM whose client rule to use. It must be connected to your workspace.
hubspot, salesforce, attio Body
Who counts as a client in one CRM: a company property condition
(field, fieldType and the values that mean client), a won deal
(wonDeal), or both, combined by match.
Set Client Rule only (Preview Client Rule ignores it). Changing or turning off a rule
that is on can remove companies from your client list, so such a save writes nothing
and answers confirmationRequired: true with currentRuleMatches, newRuleMatches,
countIsLowerBound, a sample and a message. Send the same request with confirm
set to true to apply it.
Whether the rule applies. A disabled rule is kept but marks no company as a client.
The company property's API name, from the fields endpoint. Omit field and fieldType for a rule on won deals alone.
The property's display name. Filled from the CRM when omitted.
boolean, single_select, multi_select or text, as the fields endpoint reports it.
boolean, single_select, multi_select, text The values that mean client: option values for a dropdown, ["true"] for a checkbox, exact text for a text property.
Display labels for values, in the same order.
A company with at least one won deal is a client: HubSpot
hs_is_closed_won, Salesforce IsWon, Attio a deal in one of
wonStages.
Attio only, and required there with wonDeal: the ids of the deal stages that count as won, from dealStages. Ignored for HubSpot and Salesforce.
Attio only: display labels for wonStages, in the same order.
With both conditions, any (either is enough) or all (both must hold).
any, all