Lead Type Bundles

Lead Type Bundles are ways of grouping Lead Types. A Lead Type can have a single Lead Type Bundle.

Get lead type bundles

GET /lead-type-bundles

Query string parameters

Response
Status code 200

{
  "data": [
    {
      "id": 1,
      "company_id": 1,
      "group_id": null,
      "team_id": null,
      "user_id": 1,
      "name": "Cars",
      "lead_types": [
        {
          "id": "2acb4738-dcd6-4e6e-aeb6-ed45ddeb9ab6",
          "name": "Magazine order",
          "description": "offer",
          "group_id": null,
          "team_id": null,
          "relations_paths": [
            {
              "id": "9eae431b-3d0f-4528-9c59-e9d1a40fcd04",
              "name": "Case type",
              "is_sales_type": true,
              "activity_types": {
                "milestones": [
                  {
                    "id": "a203539b-f06c-442c-8ad0-f5a56f0615f6",
                    "name": "Contract",
                    "sort_order": 1,
                    "set_status": "closed",
                    "suggest_task_after": null,
                    "template_id": null,
                    "content_suggestions": [
                      {
                        "id": "17498b87-d835-4a97-9428-24ae1dcfd9a5",
                        "type": "email",
                        "name": "consectetur",
                        "subject": "Hi",
                        "content": "Hi\nSome text here!",
                        "template_ids": null,
                        "team_id": null
                      },
                      {
                        "id": "7447f327-5dae-4276-8a87-8c8a6c9ed793",
                        "type": "email",
                        "name": "lorem ipsum",
                        "subject": "Sed ultrices",
                        "content": "Sed ultrices nec purus erat",
                        "template_ids": null,
                        "team_id": null
                      }
                    ],
                    "extra_step": null,
                    "additional_steps": null,
                    "automated_communications": [],
                    "chance_of_success": 100
                  },
                  {
                    "id": "943cef92-f9b4-4fcb-b4e4-834f34915973",
                    "name": "Milestone 2",
                    "sort_order": 2,
                    "set_status": "open",
                    "suggest_task_after": null,
                    "template_id": null,
                    "content_suggestions": [
                      {
                        "id": "5d0a2b97-cec8-4e77-bb32-624ed9e6edc9",
                        "type": "email",
                        "name": "nulam",
                        "subject": "Vivavmus dapibus",
                        "content": "enim sit amet facilisis",
                        "template_ids": null,
                        "team_id": null
                      }
                    ],
                    "extra_step": [
                      {
                        "id": "de4bb6f0-b5f4-4a7d-940d-dbeef24e3ac0",
                        "sort_order": 1,
                        "name": "Bibendum"
                      },
                      {
                        "id": "c8c7c9d3-8f6b-4e35-9fad-726f1918cd8d",
                        "sort_order": 2,
                        "name": "nam-gravida"
                      }
                    ],
                    "additional_steps": null,
                    "automated_communications": [],
                    "chance_of_success": 30
                  }
                ],
                "supportive": [
                  {
                    "id": "f4aaf74a-59c6-409b-8990-54b78eae1c75",
                    "name": "Supportive",
                    "sort_order": 2,
                    "set_status": "open",
                    "suggest_task_after": null,
                    "template_id": null,
                    "content_suggestions": [
                      {
                        "id": "fe7f4d0f-3b56-4a28-bc6e-3f7648ac52fb",
                        "type": "email",
                        "name": "ultricies",
                        "subject": "mauris",
                        "content": "Dapibus metus nisl vel odio. Nunc vitae",
                        "template_ids": null,
                        "team_id": null
                      },
                      {
                        "id": "b20c7a34-3821-47b5-a70c-f6a649b410ca",
                        "type": "letter",
                        "name": "quisque",
                        "subject": null,
                        "content": "interdum sem non egentas",
                        "template_ids": null,
                        "team_id": null
                      }
                    ],
                    "extra_step": [
                      {
                        "id": "86247236-dc8f-4d4c-b406-fed9d7db97c3",
                        "sort_order": 1,
                        "name": "maecenas"
                      },
                      {
                        "id": "bd41fe6b-49c0-4ac1-987a-65c0a8ff238a",
                        "sort_order": 2,
                        "name": "ligula"
                      },
                      {
                        "id": "3b71a00f-adca-43e2-8d2b-99e3a2d4e572",
                        "sort_order": 3,
                        "name": "nulam"
                      }
                    ],
                    "additional_steps": null,
                    "automated_communications": [],
                    "chance_of_success": 0
                  },
                  {
                    "id": "f4aaf74a-409b-59c6-4a28-54b78eae1c75",
                    "name": "Supportive",
                    "sort_order": 3,
                    "set_status": "declined",
                    "suggest_task_after": null,
                    "template_id": null,
                    "content_suggestions": [
                      {
                        "id": "fe7f4d0f-a70c-4a28-3821-3f7648ac52fb",
                        "type": "email",
                        "name": "lorem",
                        "subject": "ipsum",
                        "content": "ka passa",
                        "template_ids": null,
                        "team_id": null
                      },
                      {
                        "id": "fc0c7a34-4a28-47b5-a70c-f6a649b410ca",
                        "type": "email",
                        "name": "Lorem ipsum",
                        "subject": null,
                        "content": "Class aptent taciti socosqu",
                        "template_ids": null,
                        "team_id": null
                      }
                    ],
                    "extra_step": [
                      {
                        "id": "86247236-4d4c-b406-dc8f-fed9d7db97c3",
                        "sort_order": 1,
                        "name": "Declined because of something"
                      },
                      {
                        "id": "3441fe6b-4ac1-49c0-987a-65c0a8ff238a",
                        "sort_order": 2,
                        "name": "Declined because of something other"
                      },
                      {
                        "id": "3b71a00f-8d2b-43e2-adca-99e3a2d4e572",
                        "sort_order": 3,
                        "name": "Etiam dapibus"
                      }
                    ],
                    "additional_steps": null,
                    "automated_communications": [],
                    "chance_of_success": 0
                  }
                ]
              },
              "team_id": null,
              "group_id": null,
              "created_at": "2015-03-04 11:51:19",
              "updated_at": "2015-03-05 08:47:27"
            }
          ],
          "escalation_accept": 86400,
          "escalation_activity": 86400,
          "disabled": false,
          "enable_escalation": false,
          "enable_team_settings": true,
          "escalation_active": null,
          "lead_count": 11,
          "escalates_at": "2017-05-12 12:10:38",
          "sort_order": 0,
          "created_at": "2017-04-30 13:14:27",
          "updated_at": "2017-05-11 07:33:20"
        }
      ],
      "lead_count": 11,
      "escalates_at": "2017-05-12 12:10:38",
      "sort_order": 0
    }
  ],
  "pagination": {
    "total": 1,
    "page": 1,
    "per_page": 15,
    "urls": {
      "previous": null,
      "next": null
    }
  }
}

Create lead type bundle

POST /lead-type-bundles

Parameters

  • name string
    • Required
  • lead_types array
    • Required
    • lead_types.* UUID

Payload

{
  "name": "Cars",
  "lead_types": [
    "cf12bf54-c35b-429e-bbbe-84b158a05e8d"
  ]
}

Response
Status code 201

{
  "id": 1,
  "company_id": 1,
  "group_id": null,
  "team_id": null,
  "user_id": 1,
  "name": "Cars",
  "lead_types": [
    {
      "id": "2acb4738-dcd6-4e6e-aeb6-ed45ddeb9ab6",
      "name": "Magazine order",
      "description": "offer",
      "group_id": null,
      "team_id": null,
      "relations_paths": [
        {
          "id": "9eae431b-3d0f-4528-9c59-e9d1a40fcd04",
          "name": "Case type",
          "is_sales_type": true,
          "activity_types": {
            "milestones": [
              {
                "id": "a203539b-f06c-442c-8ad0-f5a56f0615f6",
                "name": "Contract",
                "sort_order": 1,
                "set_status": "closed",
                "suggest_task_after": null,
                "template_id": null,
                "content_suggestions": [
                  {
                    "id": "17498b87-d835-4a97-9428-24ae1dcfd9a5",
                    "type": "email",
                    "name": "consectetur",
                    "subject": "Hi",
                    "content": "Hi\nSome text here!",
                    "template_ids": null,
                    "team_id": null
                  },
                  {
                    "id": "7447f327-5dae-4276-8a87-8c8a6c9ed793",
                    "type": "email",
                    "name": "lorem ipsum",
                    "subject": "Sed ultrices",
                    "content": "Sed ultrices nec purus erat",
                    "template_ids": null,
                    "team_id": null
                  }
                ],
                "extra_step": null,
                "additional_steps": null,
                "automated_communications": [],
                "chance_of_success": 100
              },
              {
                "id": "943cef92-f9b4-4fcb-b4e4-834f34915973",
                "name": "Milestone 2",
                "sort_order": 2,
                "set_status": "open",
                "suggest_task_after": null,
                "template_id": null,
                "content_suggestions": [
                  {
                    "id": "5d0a2b97-cec8-4e77-bb32-624ed9e6edc9",
                    "type": "email",
                    "name": "nulam",
                    "subject": "Vivavmus dapibus",
                    "content": "enim sit amet facilisis",
                    "template_ids": null,
                    "team_id": null
                  }
                ],
                "extra_step": [
                  {
                    "id": "de4bb6f0-b5f4-4a7d-940d-dbeef24e3ac0",
                    "sort_order": 1,
                    "name": "Bibendum"
                  },
                  {
                    "id": "c8c7c9d3-8f6b-4e35-9fad-726f1918cd8d",
                    "sort_order": 2,
                    "name": "nam-gravida"
                  }
                ],
                "additional_steps": null,
                "automated_communications": [],
                "chance_of_success": 30
              }
            ],
            "supportive": [
              {
                "id": "f4aaf74a-59c6-409b-8990-54b78eae1c75",
                "name": "Supportive",
                "sort_order": 2,
                "set_status": "open",
                "suggest_task_after": null,
                "template_id": null,
                "content_suggestions": [
                  {
                    "id": "fe7f4d0f-3b56-4a28-bc6e-3f7648ac52fb",
                    "type": "email",
                    "name": "ultricies",
                    "subject": "mauris",
                    "content": "Dapibus metus nisl vel odio. Nunc vitae",
                    "template_ids": null,
                    "team_id": null
                  },
                  {
                    "id": "b20c7a34-3821-47b5-a70c-f6a649b410ca",
                    "type": "letter",
                    "name": "quisque",
                    "subject": null,
                    "content": "interdum sem non egentas",
                    "template_ids": null,
                    "team_id": null
                  }
                ],
                "extra_step": [
                  {
                    "id": "86247236-dc8f-4d4c-b406-fed9d7db97c3",
                    "sort_order": 1,
                    "name": "maecenas"
                  },
                  {
                    "id": "bd41fe6b-49c0-4ac1-987a-65c0a8ff238a",
                    "sort_order": 2,
                    "name": "ligula"
                  },
                  {
                    "id": "3b71a00f-adca-43e2-8d2b-99e3a2d4e572",
                    "sort_order": 3,
                    "name": "nulam"
                  }
                ],
                "additional_steps": null,
                "automated_communications": [],
                "chance_of_success": 0
              },
              {
                "id": "f4aaf74a-409b-59c6-4a28-54b78eae1c75",
                "name": "Supportive",
                "sort_order": 3,
                "set_status": "declined",
                "suggest_task_after": null,
                "template_id": null,
                "content_suggestions": [
                  {
                    "id": "fe7f4d0f-a70c-4a28-3821-3f7648ac52fb",
                    "type": "email",
                    "name": "lorem",
                    "subject": "ipsum",
                    "content": "ka passa",
                    "template_ids": null,
                    "team_id": null
                  },
                  {
                    "id": "fc0c7a34-4a28-47b5-a70c-f6a649b410ca",
                    "type": "email",
                    "name": "Lorem ipsum",
                    "subject": null,
                    "content": "Class aptent taciti socosqu",
                    "template_ids": null,
                    "team_id": null
                  }
                ],
                "extra_step": [
                  {
                    "id": "86247236-4d4c-b406-dc8f-fed9d7db97c3",
                    "sort_order": 1,
                    "name": "Declined because of something"
                  },
                  {
                    "id": "3441fe6b-4ac1-49c0-987a-65c0a8ff238a",
                    "sort_order": 2,
                    "name": "Declined because of something other"
                  },
                  {
                    "id": "3b71a00f-8d2b-43e2-adca-99e3a2d4e572",
                    "sort_order": 3,
                    "name": "Etiam dapibus"
                  }
                ],
                "additional_steps": null,
                "automated_communications": [],
                "chance_of_success": 0
              }
            ]
          },
          "team_id": null,
          "group_id": null,
          "created_at": "2015-03-04 11:51:19",
          "updated_at": "2015-03-05 08:47:27"
        }
      ],
      "escalation_accept": 86400,
      "escalation_activity": 86400,
      "disabled": false,
      "enable_escalation": false,
      "enable_team_settings": true,
      "escalation_active": [
        {
          "day_of_week": 0,
          "closed": false,
          "open": "21:06:26",
          "close": "03:33:39"
        },
        {
          "day_of_week": 1,
          "closed": true,
          "open": "16:34:59",
          "close": "17:31:12"
        },
        {
          "day_of_week": 2,
          "closed": true,
          "open": "18:39:12",
          "close": "22:04:22"
        },
        {
          "day_of_week": 3,
          "closed": false,
          "open": "08:38:00",
          "close": "04:43:11"
        },
        {
          "day_of_week": 4,
          "closed": true,
          "open": "03:01:17",
          "close": "07:15:52"
        },
        {
          "day_of_week": 5,
          "closed": true,
          "open": "10:51:09",
          "close": "13:03:12"
        },
        {
          "day_of_week": 6,
          "closed": false,
          "open": "00:21:59",
          "close": "14:54:01"
        }
      ],
      "lead_count": 11,
      "escalates_at": "2017-05-12 12:10:38",
      "sort_order": 0,
      "created_at": "2017-04-30 13:14:27",
      "updated_at": "2017-05-11 07:33:20"
    }
  ],
  "lead_count": 0,
  "escalates_at": null,
  "sort_order": 0
}

Update lead type bundle

PUT /lead-type-bundles/:lead_type_bundle_id

Parameters

  • name string
    • Required
  • lead_types array
    • Required
    • lead_types.* UUID

Payload

{
  "name": "Car - has been updated",
  "lead_types": [
    "2acb4738-dcd6-4e6e-aeb6-ed45ddeb9ab6"
  ]
}

Response
Status code 200

{
  "id": 1,
  "company_id": 1,
  "group_id": null,
  "team_id": null,
  "user_id": 1,
  "name": "Cars has been updated",
  "lead_types": [
    {
      "id": "2acb4738-dcd6-4e6e-aeb6-ed45ddeb9ab6",
      "name": "Magazine order",
      "description": "offer",
      "group_id": null,
      "team_id": null,
      "relations_paths": [
        {
          "id": "9eae431b-3d0f-4528-9c59-e9d1a40fcd04",
          "name": "Case type",
          "is_sales_type": true,
          "activity_types": {
            "milestones": [
              {
                "id": "a203539b-f06c-442c-8ad0-f5a56f0615f6",
                "name": "Contract",
                "sort_order": 1,
                "set_status": "closed",
                "suggest_task_after": null,
                "template_id": null,
                "content_suggestions": [
                  {
                    "id": "17498b87-d835-4a97-9428-24ae1dcfd9a5",
                    "type": "email",
                    "name": "consectetur",
                    "subject": "Hi",
                    "content": "Hi\nSome text here!",
                    "template_ids": null,
                    "team_id": null
                  },
                  {
                    "id": "7447f327-5dae-4276-8a87-8c8a6c9ed793",
                    "type": "email",
                    "name": "lorem ipsum",
                    "subject": "Sed ultrices",
                    "content": "Sed ultrices nec purus erat",
                    "template_ids": null,
                    "team_id": null
                  }
                ],
                "extra_step": null,
                "additional_steps": null,
                "automated_communications": [],
                "chance_of_success": 100
              },
              {
                "id": "943cef92-f9b4-4fcb-b4e4-834f34915973",
                "name": "Milestone 2",
                "sort_order": 2,
                "set_status": "open",
                "suggest_task_after": null,
                "template_id": null,
                "content_suggestions": [
                  {
                    "id": "5d0a2b97-cec8-4e77-bb32-624ed9e6edc9",
                    "type": "email",
                    "name": "nulam",
                    "subject": "Vivavmus dapibus",
                    "content": "enim sit amet facilisis",
                    "template_ids": null,
                    "team_id": null
                  }
                ],
                "extra_step": [
                  {
                    "id": "de4bb6f0-b5f4-4a7d-940d-dbeef24e3ac0",
                    "sort_order": 1,
                    "name": "Bibendum"
                  },
                  {
                    "id": "c8c7c9d3-8f6b-4e35-9fad-726f1918cd8d",
                    "sort_order": 2,
                    "name": "nam-gravida"
                  }
                ],
                "additional_steps": null,
                "automated_communications": [],
                "chance_of_success": 30
              }
            ],
            "supportive": [
              {
                "id": "f4aaf74a-59c6-409b-8990-54b78eae1c75",
                "name": "Supportive",
                "sort_order": 2,
                "set_status": "open",
                "suggest_task_after": null,
                "template_id": null,
                "content_suggestions": [
                  {
                    "id": "fe7f4d0f-3b56-4a28-bc6e-3f7648ac52fb",
                    "type": "email",
                    "name": "ultricies",
                    "subject": "mauris",
                    "content": "Dapibus metus nisl vel odio. Nunc vitae",
                    "template_ids": null,
                    "team_id": null
                  },
                  {
                    "id": "b20c7a34-3821-47b5-a70c-f6a649b410ca",
                    "type": "letter",
                    "name": "quisque",
                    "subject": null,
                    "content": "interdum sem non egentas",
                    "template_ids": null,
                    "team_id": null
                  }
                ],
                "extra_step": [
                  {
                    "id": "86247236-dc8f-4d4c-b406-fed9d7db97c3",
                    "sort_order": 1,
                    "name": "maecenas"
                  },
                  {
                    "id": "bd41fe6b-49c0-4ac1-987a-65c0a8ff238a",
                    "sort_order": 2,
                    "name": "ligula"
                  },
                  {
                    "id": "3b71a00f-adca-43e2-8d2b-99e3a2d4e572",
                    "sort_order": 3,
                    "name": "nulam"
                  }
                ],
                "additional_steps": null,
                "automated_communications": [],
                "chance_of_success": 0
              },
              {
                "id": "f4aaf74a-409b-59c6-4a28-54b78eae1c75",
                "name": "Supportive",
                "sort_order": 3,
                "set_status": "declined",
                "suggest_task_after": null,
                "template_id": null,
                "content_suggestions": [
                  {
                    "id": "fe7f4d0f-a70c-4a28-3821-3f7648ac52fb",
                    "type": "email",
                    "name": "lorem",
                    "subject": "ipsum",
                    "content": "ka passa",
                    "template_ids": null,
                    "team_id": null
                  },
                  {
                    "id": "fc0c7a34-4a28-47b5-a70c-f6a649b410ca",
                    "type": "email",
                    "name": "Lorem ipsum",
                    "subject": null,
                    "content": "Class aptent taciti socosqu",
                    "template_ids": null,
                    "team_id": null
                  }
                ],
                "extra_step": [
                  {
                    "id": "86247236-4d4c-b406-dc8f-fed9d7db97c3",
                    "sort_order": 1,
                    "name": "Declined because of something"
                  },
                  {
                    "id": "3441fe6b-4ac1-49c0-987a-65c0a8ff238a",
                    "sort_order": 2,
                    "name": "Declined because of something other"
                  },
                  {
                    "id": "3b71a00f-8d2b-43e2-adca-99e3a2d4e572",
                    "sort_order": 3,
                    "name": "Etiam dapibus"
                  }
                ],
                "additional_steps": null,
                "automated_communications": [],
                "chance_of_success": 0
              }
            ]
          },
          "team_id": null,
          "group_id": null,
          "created_at": "2015-03-04 11:51:19",
          "updated_at": "2015-03-05 08:47:27"
        }
      ],
      "escalation_accept": 86400,
      "escalation_activity": 86400,
      "disabled": false,
      "enable_escalation": false,
      "enable_team_settings": true,
      "escalation_active": [
        {
          "day_of_week": 0,
          "closed": false,
          "open": "21:06:26",
          "close": "03:33:39"
        },
        {
          "day_of_week": 1,
          "closed": true,
          "open": "16:34:59",
          "close": "17:31:12"
        },
        {
          "day_of_week": 2,
          "closed": true,
          "open": "18:39:12",
          "close": "22:04:22"
        },
        {
          "day_of_week": 3,
          "closed": false,
          "open": "08:38:00",
          "close": "04:43:11"
        },
        {
          "day_of_week": 4,
          "closed": true,
          "open": "03:01:17",
          "close": "07:15:52"
        },
        {
          "day_of_week": 5,
          "closed": true,
          "open": "10:51:09",
          "close": "13:03:12"
        },
        {
          "day_of_week": 6,
          "closed": false,
          "open": "00:21:59",
          "close": "14:54:01"
        }
      ],
      "lead_count": 11,
      "escalates_at": "2017-05-12 12:10:38",
      "sort_order": 0,
      "created_at": "2017-04-30 13:14:27",
      "updated_at": "2017-05-11 07:33:20"
    }
  ],
  "lead_count": 0,
  "escalates_at": null,
  "sort_order": 0
}

Delete lead type bundle

DELETE /lead-type-bundles/:lead_type_bundle_id

Response
Status code 204

Sort lead type bundles

PUT /lead-types/sort

Only available for admins. You can combine this with sorting of lead types.

Parameters

  • lead_type_bundles array
    • Required
    • lead_type_bundles.*.id integer
      • Required
    • lead_type_bundles.*.sort_order integer
      • Required
      • Minimum 0

Payload

{
  "lead_type_bundles": [
    {
      "id": 223,
      "sort_order": 1
    }
  ]
}

Response
Status code 204