Skip to content

Creates a sales funnel and its stages.

Method create.sales_funnel
API version
Description Creates a sales funnel and its stages.

Available to: Agents and clients

Request parameters

Name Type Required Description
access_token string yes Access token used to authenticate the request.
user_id number no Unique ID of the client user on whose behalf the agent is making the request. Required for agents. To retrieve a list of client users, use get.customer_users.
ext_id string yes External sales funnel ID.
name string yes Sales funnel name.
Sales funnel stages
stages object yes
success object yes Successful (closed-won) stage of the sales funnel.
ext_id string yes External stage ID.
name string yes Stage name.
failed object yes Failed (closed-lost) stage of the sales funnel.
ext_id string yes External stage ID.
name string yes Stage name.
in_process array yesIntermediate stages. A funnel must contain between 1 and 100 intermediate stages.
ext_id string yes External stage ID.
name string yes Stage name.
order number yes Stage order. Maximum: 10,000.

Response parameters

Name Type Required Description
ext_id string yes External sales funnel ID.

Example request

{
    "jsonrpc": "2.0",
    "id": "number",
    "method": "create.sales_funnel",
    "params": {
        "access_token": "string",
        "user_id": "number",
        "ext_id": "string",
        "name": "string",
        "stages": {
            "success": {
                "ext_id": "string",
                "name": "string"
            },
            "failed": {
                "ext_id": "string",
                "name": "string"
            },
            "in_process": [
                {
                    "ext_id": "string",
                    "name": "string",
                    "order": "number"
                }
            ]
        }
    }
}

Example response

{
  "jsonrpc": "2.0",
  "id": "number",
  "result": {
      "data": {
          "ext_id": "string"
          },
      "metadata": "object"
  }
}

Possible errors

See the "Errors for create methods" section.