Set up a pipeline
set_up_pipelineSet up a whole CRM pipeline in ONE call when the owner describes their sales or lead process, their stages, their follow-ups, or asks for a pipeline / CRM to be set up. Pass every pipeline at once (e.g. sellers/acquisitions AND buyers/dispositions): target "contacts" reshapes the contact stage list (the stages a lead moves through), target "new_deal_pipeline" makes a deal pipeline (a deal is one opportunity with one contact), or pass an existing pipeline id from list_pipelines to update it. For each stage give its label and outcome (open, or won / lost for closing stages; every pipeline needs an open stage), and when asked: a task for the rep each time something enters the stage (title, due_in_days, assign_to deal_owner or contact_owner), and a follow_up — the messages sent after the stage is entered (email, WhatsApp or SMS; WhatsApp needs an approved template outside the 24-hour window and SMS needs the site's SMS number before the journey can be switched on). Write all the copy yourself from what the site says about the business. Up to 5 messages per stage, each delay_hours after the previous one (max 90 days each), so a 6-month nurture is 5 messages about 5 weeks apart. Messages may use {{contact.first_name}} and {{trigger.deal_title}}, {{trigger.stage_label}}, {{trigger.owner_name}}. Follow-ups are saved as DRAFT journeys, switched OFF: tell the owner they must review and switch each one on (journey editor, or set_journey_enabled when they ask). AUTO-ADD (deal pipelines only): intake rules put leads on the board by themselves — source website_chat, whatsapp, form (optionally one form_id from list_pipelines forms), booking, email, contact_tag (tag required) or contact_stage (contact_stage required); stage is the OPEN stage new deals start in; condition is a plain-language qualifier the lead must match, checked by our AI against what the lead said (leave it out to add every lead from that source). A contact with an open deal in the pipeline is never added twice. Example: "put every WhatsApp and website-chat lead into this pipeline at New lead only if they want to sell" → intake [{ source: "whatsapp", stage: "New lead", condition: "they want to sell a property" }, { source: "website_chat", stage: "New lead", condition: "they want to sell a property" }]. STAGE LINKS (deal pipelines only), per stage: contact_stage moves the deal's contact to that contact stage when a deal enters the stage, add_tags / remove_tags change its tags. Example: "when a deal closes, mark them customer and tag past-seller" → on the won stage contact_stage: "customer" (a key of the contacts pipeline; include a "Customer" stage in a contacts target in the same plan if the site has none) and add_tags: ["past-seller"]. A new deal pipeline's won stages link to the contact list's won stage unless contact_stage is null. Links are one-way: they never add the contact to a pipeline again. Re-running the same plan changes nothing twice: pipelines are matched by name, stages by key/label, journeys by name, auto-add rules by source + form/tag/contact stage. replace_existing true makes each stage list (and rule list) exactly the plan (stages left out are removed and their open deals move to the first open stage); the default keeps stages and rules not mentioned. Answers with what was set up and anything skipped.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"site_id": "<site_id>",
"pipelines": "<pipelines>"
},
"name": "set_up_pipeline"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_id | Yes | The site, from list_sites | |
| pipelines | Yes | ||
| user_goal | No | Optional: the user's goal behind this call, in one short sentence of plain words (e.g. "add a page so customers can book tables"). No names, emails or other personal details. | |
| replace_existing | No | true: each pipeline's stages become exactly this list (stages left out are removed; their open deals move to the first open stage). Default false: stages left out are kept after these. |