# Sequence Bot

## Overview

<mark style="color:blue;">`GET`</mark> `https://{{account_id}}.acquire.io/api/v1/analytics/bot/sequence-bot-overview`

View how many conversations your Sequence Bot handles, including counts for initiated, completed, live hand offs, and abandoned conversations.

#### Query Parameters

| Name        | Type   | Description                                                                                                                                  |
| ----------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
| start\_date | string | Date From (Date format = YYYY-MM-DD hh:mm:ss, e.g 2021-01-01 00:00:00)                                                                       |
| end\_date   | string | Date End (Date Format = YYYY-MM-DD hh:mm:ss, e.g 2021-01-01 23:59:59)                                                                        |
| offset      | string | This parameter is used for the timezone value and the default timezone will be "GMT". e.g. +05:30 for particular timezone. Default is +00:00 |
| output      | string | json or csv                                                                                                                                  |

#### Headers

| Name          | Type   | Description                       |
| ------------- | ------ | --------------------------------- |
| Authorization | String | Bearer \*\*\*YOUR\_API\_KEY\*\*\* |

{% tabs %}
{% tab title="200 " %}

```
{
  "data": {
    "sequenceBotOverview": {
      "data": {
        "graphRow": {
          "labels": [
            "16 Mar 2020",
            "16 Apr 2020",
            "16 May 2020",
            "16 Jun 2020",
            "16 Jul 2020",
            "16 Aug 2020",
            "16 Sep 2020",
            "16 Oct 2020",
            "16 Nov 2020",
            "16 Dec 2020",
            "16 Jan 2021",
            "16 Feb 2021",
            "16 Mar 2021"
          ],
          "initiated": [
            0,
            0,
            0,
            0,
            0,
            0,
            1,
            4,
            0,
            4,
            0,
            0,
            0
          ],
          "completed": [
            0,
            0,
            0,
            0,
            0,
            0,
            1,
            1,
            0,
            1,
            0,
            0,
            0
          ],
          "liveHandOffs": [
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            3,
            0,
            2,
            0,
            0,
            0
          ],
          "abandoned": [
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            3,
            0,
            3,
            0,
            0,
            0
          ]
        },
        "summary": {
          "initiated": {
            "current": 9,
            "previous": 0,
            "info": "The number of times a visitor started a conversation with a Sequence Bot."
          },
          "completed": {
            "current": 3,
            "previous": 0,
            "info": "The number of times a visitor completes a full sequence."
          },
          "liveHandOffs": {
            "current": 5,
            "previous": 0,
            "info": "Any time a sequence bot transfer conversation to a human."
          },
          "abandoned": {
            "current": 6,
            "previous": 0,
            "info": "The number of time visitors leave a chat without completing the sequence."
          }
        }
      },
      "success": true,
      "output": "json"
    }
  }
}
```

{% endtab %}
{% endtabs %}

## Leads Generated

<mark style="color:blue;">`GET`</mark> `https://{{account_id}}.acquire.io/api/v1/analytics/bot/leads-generated`

Retrieve a list of Sequence Bot details including times initiated, completed, transferred, or incomplete.&#x20;

#### Query Parameters

| Name        | Type   | Description                                                                                                                                  |
| ----------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
| start\_date | string | Date From (Date format = YYYY-MM-DD hh:mm:ss, e.g 2021-01-01 00:00:00)                                                                       |
| end\_date   | string | Date End (Date Format = YYYY-MM-DD hh:mm:ss, e.g 2021-01-01 23:59:59)                                                                        |
| offset      | string | This parameter is used for the timezone value and the default timezone will be "GMT". e.g. +05:30 for particular timezone. Default is +00:00 |
| output      | string | json or csv                                                                                                                                  |

#### Headers

| Name          | Type   | Description                       |
| ------------- | ------ | --------------------------------- |
| Authorization | String | Bearer \*\*\*YOUR\_API\_KEY\*\*\* |

{% tabs %}
{% tab title="200 " %}

```
{
  "data": {
    "leadsGenerated": {
      "data": {
        "graphRow": {
          "data": [
            {
              "lead_name": "Sales Sequence",
              "initiated": 1,
              "completed": 1,
              "transferred": 0,
              "incompleted": 0
            },
            {
              "lead_name": "PNB Bank",
              "initiated": 8,
              "completed": 2,
              "transferred": 5,
              "incompleted": 6
            }
          ]
        }
      },
      "success": true,
      "output": "json"
    }
  }
```

{% endtab %}
{% endtabs %}

## Path Analysis

<mark style="color:blue;">`GET`</mark> `https://{{account_id}}.acquire.io/api/v1/analytics/bot/bot-path-analysis`

Retrieve branch data for a Sequence Bot. The leadId must be passed in to the endpoint as a query parameter.

#### Query Parameters

| Name        | Type    | Description                                                                                                                                  |
| ----------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| leadId      | integer | The ID for a Sequence bot lead. You can get lead i by calling bot-lead-details endpoint.                                                     |
| start\_date | string  | Date From (Date format = YYYY-MM-DD hh:mm:ss, e.g 2021-01-01 00:00:00)                                                                       |
| end\_date   | string  | Date End (Date Format = YYYY-MM-DD hh:mm:ss, e.g 2021-01-01 23:59:59)                                                                        |
| offset      | string  | This parameter is used for the timezone value and the default timezone will be "GMT". e.g. +05:30 for particular timezone. Default is +00:00 |
| output      | string  | json or csv                                                                                                                                  |

#### Headers

| Name          | Type   | Description                       |
| ------------- | ------ | --------------------------------- |
| Authorization | String | Bearer \*\*\*YOUR\_API\_KEY\*\*\* |

{% tabs %}
{% tab title="200 " %}

```
{
  "data": {
    "botPathAnalysis": {
      "data": {
        "graphRow": {
          "data": [
            {
              "from_branch": "Initiated",
              "to_branch": "Welcome",
              "count": 1,
              "from_visible_order": 0,
              "to_visible_order": 1
            },
            {
              "from_branch": "Welcome",
              "to_branch": "Explore branch",
              "count": 1,
              "from_visible_order": 1,
              "to_visible_order": 4
            },
            {
              "from_branch": "Explore branch",
              "to_branch": "Just browsing",
              "count": 1,
              "from_visible_order": 4,
              "to_visible_order": 8
            }
          ]
        }
      },
      "success": true,
      "output": "json"
    }
  }
```

{% endtab %}
{% endtabs %}

## Lead Details

<mark style="color:blue;">`GET`</mark> `https://{{account_id}}.acquire.io/api/v1/analytics/bot/bot-lead-details`

Retrieve a list of sequence bot and branch details, including their IDs.&#x20;

#### Headers

| Name          | Type   | Description                       |
| ------------- | ------ | --------------------------------- |
| Authorization | String | Bearer \*\*\*YOUR\_API\_KEY\*\*\* |

{% tabs %}
{% tab title="200 " %}

```
{
  "data": {
    "botLeadDetails": {
      "leads": [
        {
          "id": 1,
          "title": "Out Of Office Sequence",
          "details": [
            {
              "next_branch": "0,3,4",
              "id": 5,
              "title": "Welcome"
            },
            {
              "next_branch": "0,1,2",
              "id": 4,
              "title": "Leave a message"
            },
            {
              "next_branch": "0",
              "id": 3,
              "title": "Just browsing"
            },
            {
              "next_branch": "0",
              "id": 2,
              "title": "Our customer"
            },
            {
              "next_branch": "0",
              "id": 1,
              "title": "New customer"
            }
          ]
        }
      ],
      "success": true
    }
  }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.acquire.io/rest-apis/analytics/chatbot/sequence-bot.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
