Ownership
Pipeline stages, segments, segmentation and allocation rules.
On this page
Pipeline stages
Segments
Segmentation rulesets
Allocation rulesets
List pipeline stages
GET/v1/tenants/{tenantSlug}/lms/stages
Lists the pipeline stages of a process in display order, including inactive ones. Each stage maps to a fixed semanticCategory (NEW, OPEN, CONTACTED, QUALIFIED, CONVERTED, LOST, DISQUALIFIED) that reports and events use, so stage names can differ between processes.
Query parameters
processIdID of the process.
Responses
The process's stages.
An array, not paged. Each item:
createdAtWhen it was created (ISO 8601).
displayOrderPosition in lists; lower numbers come first.
idID of the stage.
isActiveWhether it is active.
isInitialWhether it is initial.
nameName of the stage, as shown in the LMS.
processIdID of the process.
semanticCategorytenantIdID of the workspace.
updatedAtWhen it last changed (ISO 8601). Send it back as
expectedUpdatedAtwhen you update.
Errors
VALIDATION_ERRORA parameter, header or body field is invalid; compare the request with the fields above (Validation errors).PARTNER_OPERATION_FORBIDDENThe key lacks theownership.readscope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.
Create a pipeline stage
POST/v1/tenants/{tenantSlug}/lms/stages
Adds a stage to a process. A process has exactly one active initial stage, where new leads start. Stage names are unique among a process's active stages (409 STAGE_NAME_CONFLICT).
- An ordinary stage: leave
isInitialout (as in the example). - A new initial stage in place of the current one: send
isInitial: trueandreplaceInitial: true. WithisInitialalone the request fails with409 INITIAL_STAGE_CONFLICT.
Request body (application/json)
displayOrderPosition in lists; lower numbers come first.
isActiveWhether it is active.
isInitialWhether it is initial.
nameName of the stage, as shown in the LMS.
processIdID of the process.
replaceInitialSend
trueto make this the initial stage in place of the current one; otherwise a second initial stage is refused.semanticCategory
Responses
The new stage.
createdAtWhen it was created (ISO 8601).
displayOrderPosition in lists; lower numbers come first.
idID of the stage.
isActiveWhether it is active.
isInitialWhether it is initial.
nameName of the stage, as shown in the LMS.
processIdID of the process.
semanticCategorytenantIdID of the workspace.
updatedAtWhen it last changed (ISO 8601). Send it back as
expectedUpdatedAtwhen you update.
Errors
VALIDATION_ERRORA parameter, header or body field is invalid; compare the request with the fields above (Validation errors).PARTNER_OPERATION_FORBIDDENThe key lacks theownership.writescope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.- The record does not exist or the key cannot see it.
STAGE_NAME_CONFLICTAnother stage already has this name.INITIAL_STAGE_CONFLICTThe process already has an initial stage; clear it or sendreplaceInitial.
Update a pipeline stage
PATCH/v1/tenants/{tenantSlug}/lms/stages/{stageId}
Renames, reorders, recategorises, activates or deactivates a stage. Send only the fields to change. To move the initial flag to this stage, send isInitial: true with replaceInitial: true (it must also be active); the previous initial stage loses the flag in the same change.
Path parameters
stageIdStage ID.
Request body (application/json)
displayOrderPosition in lists; lower numbers come first.
isActiveWhether it is active.
isInitialWhether it is initial.
nameName of the stage, as shown in the LMS.
replaceInitialSend
trueto make this the initial stage in place of the current one; otherwise a second initial stage is refused.semanticCategory
Responses
The updated stage.
createdAtWhen it was created (ISO 8601).
displayOrderPosition in lists; lower numbers come first.
idID of the stage.
isActiveWhether it is active.
isInitialWhether it is initial.
nameName of the stage, as shown in the LMS.
processIdID of the process.
semanticCategorytenantIdID of the workspace.
updatedAtWhen it last changed (ISO 8601). Send it back as
expectedUpdatedAtwhen you update.
Errors
VALIDATION_ERRORA parameter, header or body field is invalid; compare the request with the fields above (Validation errors).PARTNER_OPERATION_FORBIDDENThe key lacks theownership.writescope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.STAGE_NOT_FOUNDThe stage does not exist or the key cannot see it.STAGE_NAME_CONFLICTAnother stage already has this name.INITIAL_STAGE_CONFLICTThe process already has an initial stage; clear it or sendreplaceInitial.
List segments
GET/v1/tenants/{tenantSlug}/lms/segments
Lists all segments, active and archived, in display order, optionally for one process. Segments label what kind of lead something is (for example *High-value residential*); segmentation rules assign them. For large workspaces use List segments (paged).
Query parameters
processIdID of the process.
Responses
All matching segments.
An array, not paged. Each item:
colorTokenColour used to show it in the LMS.
createdAtWhen it was created (ISO 8601).
descriptionFree-text description.
displayOrderPosition in lists; lower numbers come first.
idID of the lead segment.
nameName of the lead segment, as shown in the LMS.
processIdID of the process.
statusCurrent status of the lead segment.
tenantIdID of the workspace.
updatedAtWhen it last changed (ISO 8601). Send it back as
expectedUpdatedAtwhen you update.
Errors
VALIDATION_ERRORA parameter, header or body field is invalid; compare the request with the fields above (Validation errors).PARTNER_OPERATION_FORBIDDENThe key lacks theownership.readscope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.
Create a segment
POST/v1/tenants/{tenantSlug}/lms/segments
Adds a segment to a process. colorToken defaults to SLATE and displayOrder to 0. Segment names are unique among a process's active segments (409). The segment is not used until a published segmentation ruleset refers to it or someone sets it on a lead.
Request body (application/json)
colorTokenColour used to show it in the LMS.
descriptionFree-text description.
displayOrderPosition in lists; lower numbers come first.
nameName of the segment, as shown in the LMS.
processIdID of the process.
Responses
The new segment.
colorTokenColour used to show it in the LMS.
createdAtWhen it was created (ISO 8601).
descriptionFree-text description.
displayOrderPosition in lists; lower numbers come first.
idID of the lead segment.
nameName of the lead segment, as shown in the LMS.
processIdID of the process.
statusCurrent status of the lead segment.
tenantIdID of the workspace.
updatedAtWhen it last changed (ISO 8601). Send it back as
expectedUpdatedAtwhen you update.
Errors
VALIDATION_ERRORA parameter, header or body field is invalid; compare the request with the fields above (Validation errors).PARTNER_OPERATION_FORBIDDENThe key lacks theownership.writescope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.SEGMENT_NAME_CONFLICTAnother segment already has this name.
List segments (paged)
GET/v1/tenants/{tenantSlug}/lms/segments/page
Lists segments in display order, filtered by process and status (ACTIVE or ARCHIVED). Paged with an opaque cursor: pass nextCursor back as cursor until it is null.
Query parameters
processIdID of the process.
statusCurrent status of the segment.
cursorOpaque cursor from the previous page's
nextCursor. Leave it out to start at the first page.limitMaximum number of records to return in one page.
Responses
One page of segments.
itemsThe records in this response, in the documented order.
nextCursorPass as
cursorto fetch the next page;nullon the last page.
Errors
VALIDATION_ERRORA parameter, header or body field is invalid; compare the request with the fields above (Validation errors).PARTNER_OPERATION_FORBIDDENThe key lacks theownership.readscope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.
Look up segments by ID
GET/v1/tenants/{tenantSlug}/lms/segments/lookup
Returns the segments with the given IDs, active or archived, so you can label leads that reference them. Repeat the segmentId query parameter for each ID (?segmentId=…&segmentId=…, 1 to 100 IDs); duplicates are ignored and unknown IDs are left out. For long lists use the QUERY form of this operation.
Responses
The segments found.
An array, not paged. Each item:
colorTokenColour used to show it in the LMS.
createdAtWhen it was created (ISO 8601).
descriptionFree-text description.
displayOrderPosition in lists; lower numbers come first.
idID of the lead segment.
nameName of the lead segment, as shown in the LMS.
processIdID of the process.
statusCurrent status of the lead segment.
tenantIdID of the workspace.
updatedAtWhen it last changed (ISO 8601). Send it back as
expectedUpdatedAtwhen you update.
Errors
VALIDATION_ERRORA parameter, header or body field is invalid; compare the request with the fields above (Validation errors).PARTNER_OPERATION_FORBIDDENThe key lacks theownership.readscope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.
Look up segments by ID (query)
QUERY/v1/tenants/{tenantSlug}/lms/segments/lookup
Same as Look up segments by ID, with the IDs sent as segmentIds in a JSON body using the HTTP QUERY method (safe and idempotent, like GET). Send Content-Type: application/json.
Request body (application/json)
segmentIdsIDs of the segment records.
Responses
The segments found.
An array, not paged. Each item:
colorTokenColour used to show it in the LMS.
createdAtWhen it was created (ISO 8601).
descriptionFree-text description.
displayOrderPosition in lists; lower numbers come first.
idID of the lead segment.
nameName of the lead segment, as shown in the LMS.
processIdID of the process.
statusCurrent status of the lead segment.
tenantIdID of the workspace.
updatedAtWhen it last changed (ISO 8601). Send it back as
expectedUpdatedAtwhen you update.
Errors
VALIDATION_ERRORA parameter, header or body field is invalid; compare the request with the fields above (Validation errors).PARTNER_OPERATION_FORBIDDENThe key lacks theownership.readscope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.QUERY_CONTENT_TYPE_UNSUPPORTEDTheQUERYrequest has noContent-Type: application/jsonbody.QUERY_VALIDATION_FAILEDTheQUERYbody is JSON but does not match the request fields.
Update a segment
PATCH/v1/tenants/{tenantSlug}/lms/segments/{segmentId}
Changes a segment's name, description, colour or display order. Send only the fields to change. Archived segments cannot be changed (409).
Path parameters
segmentIdSegment ID.
Request body (application/json)
colorTokenColour used to show it in the LMS.
descriptionFree-text description.
displayOrderPosition in lists; lower numbers come first.
nameName of the segment, as shown in the LMS.
Responses
The updated segment.
colorTokenColour used to show it in the LMS.
createdAtWhen it was created (ISO 8601).
descriptionFree-text description.
displayOrderPosition in lists; lower numbers come first.
idID of the lead segment.
nameName of the lead segment, as shown in the LMS.
processIdID of the process.
statusCurrent status of the lead segment.
tenantIdID of the workspace.
updatedAtWhen it last changed (ISO 8601). Send it back as
expectedUpdatedAtwhen you update.
Errors
VALIDATION_ERRORA parameter, header or body field is invalid; compare the request with the fields above (Validation errors).PARTNER_OPERATION_FORBIDDENThe key lacks theownership.writescope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.SEGMENT_NOT_FOUNDThe segment does not exist or the key cannot see it.SEGMENT_NAME_CONFLICTAnother segment already has this name.
Archive a segment
POST/v1/tenants/{tenantSlug}/lms/segments/{segmentId}/archive
Archives a segment so it can no longer be chosen. Leads already in it keep it. A segment that the current published segmentation version still uses cannot be archived: the request fails with 409 (SEGMENT_IN_USE) and lists the rulesets in details.rulesetIds. Archiving an archived segment returns it unchanged. No request body.
Path parameters
segmentIdSegment ID.
Responses
The archived segment.
colorTokenColour used to show it in the LMS.
createdAtWhen it was created (ISO 8601).
descriptionFree-text description.
displayOrderPosition in lists; lower numbers come first.
idID of the lead segment.
nameName of the lead segment, as shown in the LMS.
processIdID of the process.
statusCurrent status of the lead segment.
tenantIdID of the workspace.
updatedAtWhen it last changed (ISO 8601). Send it back as
expectedUpdatedAtwhen you update.
Errors
PARTNER_OPERATION_FORBIDDENThe key lacks theownership.writescope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.SEGMENT_NOT_FOUNDThe segment does not exist or the key cannot see it.- The change conflicts with the record's current state or a workflow rule;
error.codenames it.
List segmentation rulesets
GET/v1/tenants/{tenantSlug}/lms/segmentation-rulesets
Lists segmentation rulesets with their drafts, filtered by process and status. Paged with an opaque cursor: pass nextCursor back as cursor until it is null.
Query parameters
processIdID of the process.
statusCurrent status of the segmentation ruleset.
cursorOpaque cursor from the previous page's
nextCursor. Leave it out to start at the first page.limitMaximum number of records to return in one page.
Responses
One page of segmentation rulesets.
itemsThe records in this response, in the documented order.
nextCursorPass as
cursorto fetch the next page;nullon the last page.
Errors
VALIDATION_ERRORA parameter, header or body field is invalid; compare the request with the fields above (Validation errors).PARTNER_OPERATION_FORBIDDENThe key lacks theownership.readscope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.
Create a segmentation ruleset
POST/v1/tenants/{tenantSlug}/lms/segmentation-rulesets
Creates an empty segmentation ruleset for a process, at revision 0 with no published version. Each process has at most one active segmentation ruleset. It is an editable draft plus immutable published versions; leads evaluated after publication (new leads and Re-run ownership rules) use the latest published version, so editing the draft has no effect until you publish. A process that already has an active segmentation ruleset returns 409 (SEGMENTATION_RULESET_EXISTS).
Request body (application/json)
nameName of the segmentation ruleset, as shown in the LMS.
processIdID of the process.
Responses
The new, empty ruleset.
createdAtWhen it was created (ISO 8601).
currentVersionNumber of the published version;
nullbefore the first publish.currentVersionIdID of the current version;
nullif none.idID of the segmentation ruleset.
nameName of the segmentation ruleset, as shown in the LMS.
processIdID of the process.
revisionRevision number, increased on every change. Send it back as
expectedRevisionwhen you update.statusCurrent status of the segmentation ruleset.
tenantIdID of the workspace.
updatedAtWhen it last changed (ISO 8601). Send it back as
expectedUpdatedAtwhen you update.defaultSegmentIdID of the default segment;
nullif none.rulesRules, checked in
priorityorder; the first match wins.
Errors
VALIDATION_ERRORA parameter, header or body field is invalid; compare the request with the fields above (Validation errors).PARTNER_OPERATION_FORBIDDENThe key lacks theownership.writescope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.- The change conflicts with the record's current state or a workflow rule;
error.codenames it.
Get a segmentation ruleset
GET/v1/tenants/{tenantSlug}/lms/segmentation-rulesets/{rulesetId}
Returns the ruleset's draft (rules, defaultSegmentId, revision) and, in currentVersionData, the version currently in force (null until the first publish). Use revision as expectedRevision when you update or publish it.
Path parameters
rulesetIdRuleset ID.
Responses
The segmentation ruleset.
createdAtWhen it was created (ISO 8601).
currentVersionNumber of the published version;
nullbefore the first publish.currentVersionIdID of the current version;
nullif none.idID of the segmentation ruleset.
nameName of the segmentation ruleset, as shown in the LMS.
processIdID of the process.
revisionRevision number, increased on every change. Send it back as
expectedRevisionwhen you update.statusCurrent status of the segmentation ruleset.
tenantIdID of the workspace.
updatedAtWhen it last changed (ISO 8601). Send it back as
expectedUpdatedAtwhen you update.defaultSegmentIdID of the default segment;
nullif none.rulesRules, checked in
priorityorder; the first match wins.currentVersionDataThe published version's content;
nullbefore the first publish.
Errors
PARTNER_OPERATION_FORBIDDENThe key lacks theownership.readscope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.- The record does not exist or the key cannot see it.
Save a segmentation ruleset draft
PATCH/v1/tenants/{tenantSlug}/lms/segmentation-rulesets/{rulesetId}
Replaces the whole draft: name, rules and defaultSegmentId are all required.
Rules are tried in ascending priority (lowest number first) and the first rule whose conditions all match sets the segment; leads that match nothing get defaultSegmentId (or no segment when it is null). Priorities and rule IDs must be unique; a rule with an empty all list matches every lead. Conditions compare lead fields (lead.*, acquisition.*, campaign.id) or custom attributes (attributes.<name>). Every referenced segment must be active and belong to the ruleset's process (409 otherwise).
Send contractVersion: 2 to compare lead.priority by rank (1 = low to 4 = urgent).
Send the draft's current revision as expectedRevision. If someone changed the draft since you read it, the request fails with 409 (STALE_REVISION) and nothing is saved: read it again and retry. Archived rulesets cannot be changed (409).
Path parameters
rulesetIdRuleset ID.
Request body (application/json)
Responses
The saved draft.
createdAtWhen it was created (ISO 8601).
currentVersionNumber of the published version;
nullbefore the first publish.currentVersionIdID of the current version;
nullif none.idID of the segmentation ruleset.
nameName of the segmentation ruleset, as shown in the LMS.
processIdID of the process.
revisionRevision number, increased on every change. Send it back as
expectedRevisionwhen you update.statusCurrent status of the segmentation ruleset.
tenantIdID of the workspace.
updatedAtWhen it last changed (ISO 8601). Send it back as
expectedUpdatedAtwhen you update.defaultSegmentIdID of the default segment;
nullif none.rulesRules, checked in
priorityorder; the first match wins.
Errors
VALIDATION_ERRORA parameter, header or body field is invalid; compare the request with the fields above (Validation errors).PARTNER_OPERATION_FORBIDDENThe key lacks theownership.writescope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.- The record does not exist or the key cannot see it.
- The change conflicts with the record's current state or a workflow rule;
error.codenames it.
Publish a segmentation ruleset
POST/v1/tenants/{tenantSlug}/lms/segmentation-rulesets/{rulesetId}/publish
Freezes the current draft as the next numbered version, which is then used for every lead segmented from now on. Existing leads keep their segment until they are re-evaluated. The referenced segments are checked again (409 if any is no longer active). Send the draft's current revision as expectedRevision. If someone changed the draft since you read it, the request fails with 409 (STALE_REVISION) and nothing is saved: read it again and retry.
Path parameters
rulesetIdRuleset ID.
Request body (application/json)
expectedRevisionThe
revisionfrom your last read. If the record changed since, the request fails with409and nothing is saved.
Responses
The published version.
defaultSegmentIdID of the default segment;
nullif none.idID of the segmentation version.
processIdID of the process.
publishedAtWhen it was published (ISO 8601).
publishedByUser ID of the member who published it.
rulesRules, checked in
priorityorder; the first match wins.rulesetIdID of the ruleset.
versionVersion number.
Errors
VALIDATION_ERRORA parameter, header or body field is invalid; compare the request with the fields above (Validation errors).PARTNER_OPERATION_FORBIDDENThe key lacks theownership.writescope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.- The record does not exist or the key cannot see it.
STALE_REVISIONThe record changed after your read (expectedRevision); read it again and resend.
List allocation rulesets
GET/v1/tenants/{tenantSlug}/lms/allocation-rulesets
Lists allocation rulesets with their drafts, filtered by process and status. Paged with an opaque cursor: pass nextCursor back as cursor until it is null.
Query parameters
processIdID of the process.
statusCurrent status of the allocation ruleset.
cursorOpaque cursor from the previous page's
nextCursor. Leave it out to start at the first page.limitMaximum number of records to return in one page.
Responses
One page of allocation rulesets.
itemsThe records in this response, in the documented order.
nextCursorPass as
cursorto fetch the next page;nullon the last page.
Errors
VALIDATION_ERRORA parameter, header or body field is invalid; compare the request with the fields above (Validation errors).PARTNER_OPERATION_FORBIDDENThe key lacks theownership.readscope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.
Create an allocation ruleset
POST/v1/tenants/{tenantSlug}/lms/allocation-rulesets
Creates an empty allocation ruleset for a process, at revision 0 with no published version. Each process has at most one active allocation ruleset. It is an editable draft plus immutable published versions; leads evaluated after publication (new leads and Re-run ownership rules) use the latest published version, so editing the draft has no effect until you publish. A process that already has an active allocation ruleset returns 409 (ALLOCATION_RULESET_EXISTS).
Request body (application/json)
nameName of the allocation ruleset, as shown in the LMS.
processIdID of the process.
Responses
The new, empty ruleset.
createdAtWhen it was created (ISO 8601).
currentVersionNumber of the published version;
nullbefore the first publish.currentVersionIdID of the current version;
nullif none.idID of the allocation ruleset.
nameName of the allocation ruleset, as shown in the LMS.
processIdID of the process.
revisionRevision number, increased on every change. Send it back as
expectedRevisionwhen you update.statusCurrent status of the allocation ruleset.
tenantIdID of the workspace.
updatedAtWhen it last changed (ISO 8601). Send it back as
expectedUpdatedAtwhen you update.fallbackTeamIdID of the fallback team;
nullif none.rulesRules, checked in
priorityorder; the first match wins.
Errors
VALIDATION_ERRORA parameter, header or body field is invalid; compare the request with the fields above (Validation errors).PARTNER_OPERATION_FORBIDDENThe key lacks theownership.writescope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.- The change conflicts with the record's current state or a workflow rule;
error.codenames it.
Get an allocation ruleset
GET/v1/tenants/{tenantSlug}/lms/allocation-rulesets/{rulesetId}
Returns the ruleset's draft (rules, fallbackTeamId, revision) and, in currentVersionData, the version currently in force (null until the first publish). Use revision as expectedRevision when you update or publish it.
Path parameters
rulesetIdRuleset ID.
Responses
The allocation ruleset.
createdAtWhen it was created (ISO 8601).
currentVersionNumber of the published version;
nullbefore the first publish.currentVersionIdID of the current version;
nullif none.idID of the allocation ruleset.
nameName of the allocation ruleset, as shown in the LMS.
processIdID of the process.
revisionRevision number, increased on every change. Send it back as
expectedRevisionwhen you update.statusCurrent status of the allocation ruleset.
tenantIdID of the workspace.
updatedAtWhen it last changed (ISO 8601). Send it back as
expectedUpdatedAtwhen you update.fallbackTeamIdID of the fallback team;
nullif none.rulesRules, checked in
priorityorder; the first match wins.currentVersionDataThe published version's content;
nullbefore the first publish.
Errors
PARTNER_OPERATION_FORBIDDENThe key lacks theownership.readscope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.- The record does not exist or the key cannot see it.
Save an allocation ruleset draft
PATCH/v1/tenants/{tenantSlug}/lms/allocation-rulesets/{rulesetId}
Replaces the whole draft: name, rules and fallbackTeamId are all required.
Rules are tried in ascending priority (lowest number first) and the first rule whose conditions all match decides the owner:
FIXED_AGENTassignsuserIdinteamId(auserIdis required).TEAM_QUEUEputs the lead in the team's queue (userIdmust benull).ROUND_ROBINrotates through the team's members (userIdmust benull).
Leads that match nothing go to the fallbackTeamId queue, or stay unassigned when it is null. Conditions compare segment.id, campaign.id, source.connectionId, source.definitionKey, lead fields or custom attributes (attributes.<name>). Referenced teams and members must be active (409 otherwise). Leads with a manual assignment lock are never reassigned by rules.
Send the draft's current revision as expectedRevision. If someone changed the draft since you read it, the request fails with 409 (STALE_REVISION) and nothing is saved: read it again and retry. Archived rulesets cannot be changed (409).
Path parameters
rulesetIdRuleset ID.
Request body (application/json)
expectedRevisionThe
revisionfrom your last read. If the record changed since, the request fails with409and nothing is saved.fallbackTeamIdID of the fallback team;
nullif none.nameName of the allocation ruleset, as shown in the LMS.
rulesRules, checked in
priorityorder; the first match wins.
Responses
The saved draft.
createdAtWhen it was created (ISO 8601).
currentVersionNumber of the published version;
nullbefore the first publish.currentVersionIdID of the current version;
nullif none.idID of the allocation ruleset.
nameName of the allocation ruleset, as shown in the LMS.
processIdID of the process.
revisionRevision number, increased on every change. Send it back as
expectedRevisionwhen you update.statusCurrent status of the allocation ruleset.
tenantIdID of the workspace.
updatedAtWhen it last changed (ISO 8601). Send it back as
expectedUpdatedAtwhen you update.fallbackTeamIdID of the fallback team;
nullif none.rulesRules, checked in
priorityorder; the first match wins.
Errors
VALIDATION_ERRORA parameter, header or body field is invalid; compare the request with the fields above (Validation errors).PARTNER_OPERATION_FORBIDDENThe key lacks theownership.writescope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.- The record does not exist or the key cannot see it.
STALE_REVISIONThe record changed after your read (expectedRevision); read it again and resend.
Publish an allocation ruleset
POST/v1/tenants/{tenantSlug}/lms/allocation-rulesets/{rulesetId}/publish
Freezes the current draft as the next numbered version, which is then used for every lead allocated from now on. Existing leads keep their owner until they are re-evaluated. Referenced teams and members are checked again (409 if any is no longer eligible). Send the draft's current revision as expectedRevision. If someone changed the draft since you read it, the request fails with 409 (STALE_REVISION) and nothing is saved: read it again and retry.
Path parameters
rulesetIdRuleset ID.
Request body (application/json)
expectedRevisionThe
revisionfrom your last read. If the record changed since, the request fails with409and nothing is saved.
Responses
The published version.
fallbackTeamIdID of the fallback team;
nullif none.idID of the allocation version.
processIdID of the process.
publishedAtWhen it was published (ISO 8601).
publishedByUser ID of the member who published it.
rulesRules, checked in
priorityorder; the first match wins.rulesetIdID of the ruleset.
versionVersion number.
Errors
VALIDATION_ERRORA parameter, header or body field is invalid; compare the request with the fields above (Validation errors).PARTNER_OPERATION_FORBIDDENThe key lacks theownership.writescope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.- The record does not exist or the key cannot see it.
STALE_REVISIONThe record changed after your read (expectedRevision); read it again and resend.