Routing rules
List the routing rules of a pipeline
Lists the routing rules of one pipeline, in the order they are evaluated. Use it before you add or reorder a rule. Read only. It is safe to repeat.
Required scope: pipelines:read.
path Parameters
id^ppl_[0-9A-Za-z]{22}… · requiredThe id of the pipeline (ppl_…).
query Parameters
limitcursorThe nextCursor of the previous page, with the same filters.
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
List the routing rules of a pipeline › Responses
objecthasMorenextCursorCreate a routing rule
When a case reaches fromStageId, it goes to another pipeline: a new case is opened there (create) or the case moves (move).
Required scope: pipelines:write.
path Parameters
id^ppl_[0-9A-Za-z]{22}… · requiredThe id of the pipeline (ppl_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Idempotency-KeyMakes the request safe to retry. Once it starts running, its final response (2xx, 4xx or 5xx) is kept for 24 hours and the same key gets it back, without repeating the effect. A request rejected before it runs leaves the key free. A replayed create omits the secret. The same key with a different request is rejected with 409 idempotency_key_reused.
Create a routing rule › Request Body
fromStageIdThe stage of this pipeline that triggers the rule.
toPipelineIdThe pipeline the case goes to.
toStageIdA stage of the destination. Its entry stage when omitted.
modecreate opens a new case in the destination and keeps this one. move takes the case there.
enabledCreate a routing rule › Responses
objectidpipelineIdfromStageIdtoPipelineIdtoStageIdmodeenabledcreatedAtupdatedAtRetrieve a routing rule
Returns one routing rule of a pipeline by id. Use it to refresh a single record you already know; to find records, use the list route. Read only. 404 not_found when the id does not exist or belongs to another organization. You can repeat it safely: it has no side effects.
Required scope: pipelines:read.
path Parameters
id^ppl_[0-9A-Za-z]{22}… · requiredThe id of the pipeline (ppl_…).
ruleId^rr_[0-9A-Za-z]{22}$ · requiredThe id of the routing rule (rr_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Retrieve a routing rule › Responses
objectidpipelineIdfromStageIdtoPipelineIdtoStageIdmodeenabledcreatedAtupdatedAtDelete a routing rule
Removes a routing rule from its pipeline. Cases already routed stay where they are; new cases stop matching the rule. The effect is permanent through the API. Repeating the call returns 404 not_found, because the routing rule no longer exists, so do not retry a 404 as a failure.
Required scope: pipelines:write.
path Parameters
id^ppl_[0-9A-Za-z]{22}… · requiredThe id of the pipeline (ppl_…).
ruleId^rr_[0-9A-Za-z]{22}$ · requiredThe id of the routing rule (rr_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Delete a routing rule › Responses
Update a routing rule
Changes a routing rule. Send only the fields you want to change. 422 when the new values do not form a valid rule. Applying the same body twice leaves the same result. To remove a rule, delete it instead.
Required scope: pipelines:write.
path Parameters
id^ppl_[0-9A-Za-z]{22}… · requiredThe id of the pipeline (ppl_…).
ruleId^rr_[0-9A-Za-z]{22}$ · requiredThe id of the routing rule (rr_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Update a routing rule › Request Body optional
toStageIdmodeenabledUpdate a routing rule › Responses
objectidpipelineIdfromStageIdtoPipelineIdtoStageIdmodeenabledcreatedAtupdatedAt