Skip to main content
POST
Runs a draft rule against the CRM and answers how many of its companies would count as clients, with a few of their names. Nothing is saved. Takes the same body as Set Client Rule. 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

Authorization
string
header
required

The API key you created on the API settings page of the Clustr app.

Path Parameters

provider
enum<string>
required

The CRM whose client rule to use. It must be connected to your workspace.

Available options:
hubspot,
salesforce,
attio

Body

application/json

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.

confirm
boolean

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.

enabled
boolean

Whether the rule applies. A disabled rule is kept but marks no company as a client.

field
string

The company property's API name, from the fields endpoint. Omit field and fieldType for a rule on won deals alone.

fieldLabel
string

The property's display name. Filled from the CRM when omitted.

fieldType
enum<string>

boolean, single_select, multi_select or text, as the fields endpoint reports it.

Available options:
boolean,
single_select,
multi_select,
text
values
string[]

The values that mean client: option values for a dropdown, ["true"] for a checkbox, exact text for a text property.

valueLabels
string[]

Display labels for values, in the same order.

wonDeal
boolean

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.

wonStages
string[]

Attio only, and required there with wonDeal: the ids of the deal stages that count as won, from dealStages. Ignored for HubSpot and Salesforce.

wonStageLabels
string[]

Attio only: display labels for wonStages, in the same order.

match
enum<string>
default:any

With both conditions, any (either is enough) or all (both must hold).

Available options:
any,
all

Response

The count and a sample

success
boolean
Example:

true

data
object