Skip to main content
PUT
Saves the client rule for one CRM, the same rule as Targeting > Clients in the app. It replaces the saved rule whole. The rule is checked against the CRM’s company schema, then a pull of that CRM’s clients starts straight away; after that the list updates nightly. A rule has one or both of two conditions:
  • A company property: field, field_type and the values that mean client. Get the property names, types and options from List Client Rule Fields.
  • A won deal (wonDeal: true): HubSpot reads hs_is_closed_won, Salesforce reads IsWon, and Attio, which has no won flag, uses the deal stages you list in won_stages.
With both, match is any (either is enough, the default) or all (both must hold). Check what a rule selects first with Preview Client Rule.

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
Available options:
attio,
hubspot,
salesforce

Body

application/json
enabled
boolean
field
string
field_label
string
field_type
enum<string>
Available options:
boolean,
single_select,
multi_select,
text
values
string[]
value_labels
string[]
won_deal
boolean

A company with at least one won deal is a client (HubSpot hs_is_closed_won, Salesforce Intro.IsWon, Attio a deal in one of won_stages). Omit field and field_type for a rule on won deals alone.

won_stages
string[]

Attio only: the deal stage status ids that count as won (from the fields route's deal_stages). Required, at least one, when won_deal is true on Attio; ignored on HubSpot and Salesforce.

won_stage_labels
string[]

Titles of won_stages, aligned by index, kept for display.

match
enum<string>

How the property and won-deal conditions combine when both are set: any (either is enough) or all (both must hold). Defaults to any.

Available options:
any,
all
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.

Response

Typed result envelope.

The answer depends on the values that choose what the call does:

  • provider=attio: HandlePutApiIntegrationsAttioCustomerRuleEnvelope
  • provider=hubspot: HandlePutApiIntegrationsHubspotCustomerRuleEnvelope
  • provider=salesforce: HandlePutApiIntegrationsSalesforceCustomerRuleEnvelope
success
boolean
required
data
object
required