Manage project pipeline entries
Use this workflow when an integration needs to read candidates from a project, filter them by stage, add new leads to a project, or move existing leads through the pipeline.1
Get the project stages
Pipeline entry filters use stage IDs, not stage names. Start by reading
the project and storing the stage ID you need, for example the Response excerpt:
Sourced
stage.2
List only entries in a given stage
The project is selected by the URL path (
/projects/{project_id}/entries).
Add stage_id as a query parameter to return only entries currently in that
stage for the same project. Values like Sourced are not accepted directly;
use the stage UUID returned by GET /projects/{id}.3
Create or update the contact
If the lead is new, create a contact first:If the lead already exists and you only need to update their profile, use:
4
Add the contact to the project
Add the contact to the project pipeline. If
stage_id is omitted, Leonar
adds the contact to the first stage of the project pipeline. Per-contact
sequence values can be supplied under custom_variables. Project variables
such as project_variable_1 are shared by every entry in the project and
must instead be set through PUT /projects/{id} under project_variables.5
Move an existing project lead to another stage
Use the pipeline entry ID from
GET /projects/{id}/entries, then pass the
target stage UUID.Enrich a contact and find their email
1
Trigger enrichment
2
Poll until completed
Enrichment is asynchronous. Poll every 5 seconds:Response when completed:
The email is automatically added to the contact record. No need to update the contact manually.
Enroll contacts in a sequence
1
List available sequences
2
Enroll contacts (simple format)
3
Or enroll with custom variables
Sequence custom variables use fixed placeholder names:
Example enrollment payload:At send time, Leonar resolves the example step to something like:Response:
{{custom_variable_1}} through {{custom_variable_5}}. Add those
placeholders in the sequence step content, then pass per-contact values in
custom_variables when enrolling. Arbitrary names like project_name are
rejected.Example sequence step:Create and manage a deal
1
Get pipeline stages
2
Create a deal
3
Link a contact to the deal
4
Move deal through stages
5
Close the deal
Search and tag contacts
1
Create a tag
2
Search contacts
3
Tag matching contacts
For each matching contact: