Client Companies
Set Customer Rule
Set who counts as a client in one connected CRM
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_typeand thevaluesthat mean client. Get the property names, types and options from List Client Rule Fields. - A won deal (
wonDeal: true): HubSpot readshs_is_closed_won, Salesforce readsIsWon, and Attio, which has no won flag, uses the deal stages you list inwon_stages.
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
Body
application/json
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: HandlePutApiIntegrationsAttioCustomerRuleEnvelopeprovider=hubspot: HandlePutApiIntegrationsHubspotCustomerRuleEnvelopeprovider=salesforce: HandlePutApiIntegrationsSalesforceCustomerRuleEnvelope