Get Results from Whatsapp Chatbot Processes

In this guide, you will learn how to retrieve results from specific client interactions or obtain a history of interactions between your customers and your chatbots. This information will help your business analyze flows behavior and specific conversation details.

Getting results with Truora’s Dashboard

To access individual or historical results of your chatbot processes:

  1. Log in to Truora’s platform.
  2. Navigate to Customer Engagement.
  3. In the left sidebar, click on Chatbot History. This will display a search bar where you can filter interactions by phone number or flow ID. Below the search bar, you’ll find a list of interactions with the following details:
chatbot_history
  • Message type: Indicates whether the conversation was triggered by an Outbound or Inbound message.
  • Phone number: The customer’s phone number
  • Start message: The initial message from the customer (if it was Inbound) or the Outbound message name and ID (if the initial message was Outbound).
  • Creation date: The date and time when the interaction started.
  • Status: The current status of the interaction. Possible statuses include:
    • In progress: The user is still interacting with the chatbot (not with an agent).
    • Agent chat: The interaction is currently being handled by an agent.
    • Finished: The user reached the end of the flow.
    • Cancelled: The user canceled the interaction by typing EXIT.
    • Expired: The process expiration time has passed (typically 24 hours).

Viewing individual results

To view more details about a specific interaction, click on the Message Type column of the desired interaction, or click the three dots in the Options column and select View Details. The details displayed will vary depending on the interaction:

specific_chat_details
  • ProcessID: The unique ID of the process carried out by the user.
  • AccountID: The account ID of the user who initiated the process.
  • FlowID: The ID of the flow sent to the user.
  • Creation date: The date and time when the interaction started.

Details on expiration, declination, or failure

  • Failure status: Information on why the process failed.
  • Declined reason: The reason why the process was cancelled.
  • Expiration reason: The reason why the process expired.

Chatbot interactions

  • User Responses: At the bottom of the details window, you’ll see all the responses the user provided for each chatbot step or question.

Validation details If the process includes an identity validation step, depending on the specific validations, you may find details such as:

  • Name: The name of the user undergoing validation.
  • Document: The document provided by the user during validation.
  • Check: A link to the background check results.
  • Signature: A link to the signed document.
  • Validation results: Results of each validation process, found at the bottom of the page.

Download History - CSV file

In Chatbot History, you can download a CSV file with historical results of all processes within a specific time range, up to two months. If you need to download the history for a specific flow, you’ll need to know the flow ID. To find the flow ID, you have at least two options:

  1. Copy the flow ID when Viewing individual results.
  2. Go to My flows and copy the desired flow ID from the copy icon:
copy_flow_id

Once you have the flow ID, follow these steps:

  1. Go to Chatbot History and click on the Download button.
  2. Select the language: Choose from English, Spanish, or Portuguese.
  3. You may filter results by:
  • Range of dates only: Download history for all flows within a specific date range, up to two months.
  • Range of dates and a Flow ID: Download interactions for a specific flow within the selected date range.
  1. Click Download.
specific_chat_details

The details in the CSV file can be valuable for analyzing flow and user behavior, optimizing internal processes, or extracting information for other purposes. For example, you might use the list of phone numbers from a specific flow to send an Outbound Message to a batch of users. Learn more about this in our Campaigns guide.

Getting results with Truora’s API

Each time your users starts interacting with your flow, a process_id is generated to identify each unique conversation. You can use this id to extract the details of each conversation so you can take more action.

To get the details of the conversation:

  1. Create a GET request to the endpoint https://api.identity.truora.com/v1/processes/{process_id}/result
  2. Replace {process_id} in the URL with the Process ID obtained in Truora’s Dashboard when Viewing individual results, or in the response when notified via Webhooks. To learn more about Whatsapp Webhooks, visit this guide.
whatsapp_process_id
  1. Create a Header named Truora-API-Key and set its value to your Truora API key. If you don’t have one already, go to Authentication to obtain your Truora API-key.

  2. Send the request.

You will receive a response similar to the following:

GET
/v1/processes/{process_id}/result

{
    "process_id": "IDP19d63ff90dd2XXXXXXXXXXXXXXXXXXXXX",
    "account_id": "573146252175-inbound-decaf7c3XXXXXXXXXXXXXXXXXXXXX",
    "client_id": "TCI1c787378d6939XXXXXXXXXXXXXXXXXXXXX",
    "flow_id": "IPFd93eb4cc27fXXXXXXXXXXXXXXXXXXXXX",
    "created_via": "whatsapp",
    "flow_version": 3,
    "country": "ALL",
    "status": "success",
    "user_responses": [
        {
            "name": "name_greeting",
            "type": "text",
            "value": "John"
        },
        {
            "name": "greeting",
            "type": "select",
            "value": "No"
        },
        {
            "name": "friend",
            "type": "select",
            "value": "No"
        }
    ],
    "last_finished_step": {
        "step_id": "IPS91fb03753bXXXXXXXXXXXXXXXXXXXXX",
        "verification_id": "VRF4d23b0xx_05e3_XXXXXXXXXXXXXXXXXXXXX",
        "type": "enter_response",
        "verification_output": {
            "status": "success",
            "message": "No",
            "media_uploaded": false,
            "step_data_received": true
        },
        "config": {
            "retries": 3,
            "timeout": 0
        },
        "expected_inputs": [
            {
                "type": "select",
                "value": "No",
                "name": "friend",
                "placeholder": "",
                "description": "We're done. \n\nBefore letting you go, do you have a friend that would like to use our services?",
                "length": 0,
                "read_only": false,
                "response_options": [
                    {
                        "value": "Yes"
                    },
                    {
                        "value": "No"
                    }
                ]
            }
        ],
        "files_upload_urls": null,
        "remaining_retries": 0,
        "async_step": null,
        "start_date": "2024-08-08T13:12:09.839794869Z",
        "finish_date": "2024-08-08T13:12:21.70868765Z"
    },
    "creation_date": "2024-08-08T13:11:33.104379198Z",
    "update_date": "2024-08-08T13:12:22Z",
    "ip_address": "unknown",
    "trigger_info": {
        "channel_name": "whatsapp",
        "channel_type": "inbound",
        "id": "WIFabb404f24794cXXXXXXXXXXXXXXXXXXXXX",
        "name": "",
        "message": "Hola! ",
        "media_content_path": "",
        "trigger_user": "",
        "response": "",
        "options": null,
        "created_at": "2024-08-08T13:11:33.022788618Z"
    },
    "time_to_live": 1410,
    "current_step_index": 3
}

Once you start or finish a process you will be able to see the results. The possible states of a process are success, pending, or failure.

  • Pending: Means the process is still ongoing.
  • Success: Occurs when all the steps in the process are successful, and if the flow has validators, all validation_status are successful.
  • Failure: Can occur due to an internal error, a timeout, or if the process is declined or expired.