CRM

Save a pipeline

crm_save_pipeline · Changes data · Markdown

Creates a deal pipeline or changes one: its name, position and stages in order.

$0.001 a call

From your agent’s balance. A call that fails costs nothing.

An example

Set up a separate pipeline for kitchen planners who apply for a trade account: application in, a demo in the test kitchen, first order, or not a fit.

Your agent callscrm_save_pipeline$0.001 a call

The example business is Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff. The reply is the one the tool really gives.

With these arguments
{
  "name": "Trade accounts",
  "stages": [
    {
      "name": "Application in",
      "probability": 30
    },
    {
      "name": "Test kitchen demo",
      "probability": 60
    },
    {
      "name": "First order",
      "outcome": "won"
    },
    {
      "name": "Not a fit",
      "outcome": "lost"
    }
  ]
}
What comes back
{
  "pipeline": {
    "id": 4102,
    "name": "Trade accounts",
    "position": 1,
    "stages": [
      {
        "id": 4108,
        "name": "Application in",
        "position": 0,
        "probability": 30,
        "outcome": "open",
        "deals": 0,
        "value": {}
      },
      {
        "id": 4109,
        "name": "Test kitchen demo",
        "position": 1,
        "probability": 60,
        "outcome": "open",
        "deals": 0,
        "value": {}
      }
    ]
  },
  "created": true
}

Use it when

The business sells in a way the default Sales pipeline does not fit, or its stages change.

What it does

Create a deal pipeline, or change one (by pipeline_id, or the pipeline with this name): its name, its position among the pipelines, and its stages in order. A stage that still holds deals cannot be dropped; move them first with crm_move_deal.

What comes back

The pipeline with its stages as saved, and created: true when it is new. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
pipeline_idintegerAt least 1.
nameRequiredstring1 to 80 characters.
positioninteger0 to 100.
stagesarray of objectsAll the stages, in order. Keep a stage (and its deals) by giving its id or its current name. Won and Lost are added when no stage has those outcomes; open stages without a probability get one spread evenly. 1 to 30 items.
stages[].idintegerAt least 1.
stages[].nameRequiredstring1 to 60 characters.
stages[].probabilityinteger0 to 100.
stages[].outcomestringOne of: open,won,lost. Default: open.

The call

Over MCP, call crm_save_pipeline on https://api.conecto.chat/mcp/crm. Over REST:

Terminal
curl -X POST https://api.conecto.chat/v1/tools/crm_save_pipeline \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Trade accounts","stages":[{"name":"Application in","probability":30},{"name":"Test kitchen demo","probability":60},{"name":"First order","outcome":"won"},{"name":"Not a fit","outcome":"lost"}]}'

When it refuses

A refused call costs nothing and says what to do next.

CodeWhenWhat to do
not_found404No pipeline has that pipeline_id.Call crm_list_pipelines and use one of its ids.
invalid_input400A new pipeline has no stages, no stage is open, two stages share a name, or a stage id belongs to another pipeline.Send every stage in order with its own name and at least one open stage.
conflict409Another pipeline already has that name, or a stage left out still holds deals.Pick another name, or move the deals with crm_move_deal first.
limit_reached409The business has as many pipelines as it may.Delete a pipeline it no longer uses with crm_delete_pipeline.

Give this to your agent.

Set up Conecto from https://conecto.chat/SKILL.md