Skip to main content
POST
Create a rules-of-engagement policy
Creates a policy that sequences can be pointed at, for example a lighter set of rules for a re-engagement cadence.
  1. Read Get the rules-of-engagement catalog for the conditions, actions and outcomes you can use.
  2. Measure the scenarios with Preview a draft rule set.
  3. Create the policy.
  4. Point sequences at it by setting policy with Update a sequence, or make it the default with Make a policy the team default.

Rules that read call history

Three conditions read every dial to the person, from any list in the dialer or any sequence, by anyone on the team. They are valid at every scope. Results are named by the id from List dispositions.

Starting people in another sequence

The route_to_sequence action starts a person in another sequence instead of this one. It runs at enrollment only, and params.sequence names the target:
  • The target must be one of your team’s sequences that is not archived, and cannot be one of the rule’s own sequences. Otherwise the save is refused with 400, naming the rule.
  • Both sequences record why. Adding people reports them in routed, and runs in routed_count.
  • Someone already routed is not routed again, and someone the target cannot take is skipped with the reason.
See Start them in another sequence instead.

Rules for some sequences only

Each rule and reaction can carry sequences, up to 50 sequence ids it applies to. Leave it out, or send [], for every sequence that uses the policy. See Only in these sequences.

Good to know

  • Only the team owner or an admin can create policies.
  • block, warn, require_approval and route_to_sequence run at enrollment only; skip_step, pause and finish run before a step only.
  • An invalid rule set returns 400 with every problem listed in errors, each naming the rule it belongs to.
  • Policy names are unique on the team. Reusing one returns 409.

Authorizations

x-api-key
string
header
required

Team-scoped API key generated in the Salesfinity dashboard under Settings → Connections → API & Webhooks. A missing or invalid key returns HTTP 403.

Headers

Idempotency-Key
string

Makes this write safe to retry. Send a unique value, such as a UUID, and send the same value again when you retry the same request. A retry with the same key and the same request (method, path including the query string, and JSON body) returns the original successful response without acting twice. The same key with a different body or path returns 409, and so does a retry while the first request is still running; that one is safe to repeat after a moment. A request that fails frees its key, so a retry runs the write again: after a 5xx on a create, confirm with a GET before retrying. Keys are kept for 24 hours and are scoped to your team.

Body

application/json
name
string
required

Unique on the team. Must not be empty.

Maximum string length: 120
user_id
string
required

The team member authoring the policy. Must be an active member of the team, and the team owner or an admin.

description
string
Maximum string length: 2000
rules
object[]

Scenarios, evaluated in order. Up to 100.

Maximum array length: 100
outcome_rules
object[]

Reactions. Up to 50.

Maximum array length: 50
crm_refresh_hours
number
default:24

Whole hours, 1 to 168. How old a contact's stored CRM data may be before a CRM-backed rule refreshes it. Defaults to 24.

Required range: 1 <= x <= 168

Response

The created policy.

A rules-of-engagement policy.

_id
string

24-character hexadecimal id.

Example:

"507f1f77bcf86cd799439011"

team
string

Team id.

name
string

Unique on the team.

description
string | null
is_default
boolean

The policy every sequence that names none of its own runs under. Exactly one per team.

crm_refresh_hours
integer

How old a contact's stored CRM data may be, in hours, before a CRM-backed rule refreshes it.

rules
object[]

Scenarios, in evaluation order.

outcome_rules
object[]

Reactions.

sequence_count
integer

Only on GET /v2/sequencer/policies: sequences running under this policy. The default also counts every sequence that names no policy.

created_by
string

Who created it. Absent on the default policy the team started with.

updated_by
string

Who changed it last.

created_at
string<date-time>
updated_at
string<date-time>