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.
    • Agent chat: The interaction is currently being handled by an agent.
    • Finished: The user completed the flow within the configured expiration window.
    • Cancelled: The user rejected the conversation, deleted it, or canceled 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.

Chatbot Process Statuses

When downloading the Chatbot History CSV file, you will find Status information for Flows, Conversations and Sent Outbound Messages. The following tables provide details to help you better understand each of these statuses:

  • Flow Status: In the Status column, next to the Flow ID, you’ll find the current status of the flow. The possible statuses are:
Status Description
Pending Indicates the process is still ongoing.
Success All steps in the process have been completed successfully. If the flow includes validation steps, all validation statuses are successful.
Failure Can occur if the process is declined or expired, due to a timeout, or because of an internal error.
  • Conversation Status: The Conversation Status column, next to the Session ID, displays the current status of the chat interaction. Possible statuses include:
Conversation Status Description
In progress The user is still interacting with the chatbot.
Finished The user completed the flow within the configured expiration window.
Cancelled The user rejected the conversation, deleted it, or canceled by typing “EXIT”.
Expired The process expiration time has passed (typically 24 hours).
  • Outbound Status: If the conversation was triggered by an Outbound Message, the Outbound Status and Outbound Failure Reason columns (next to the Outbound ID) provide information about the sent message. The possible statuses are:
Outbound Status Description
Sent The message was sent to the user (Single check mark).
Delivered The message was received by the user (Double check marks).
Read The user has read the message (This only appears when the user has the Read receipts feature enabled).
Failed The message could not be sent to the user.

If the Outbound Status is marked as Failed, there could be various reasons for this. For more information, refer to Appendix 1: Outbound Failure Reasons.

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: Indicates the process is still ongoing.
  • Success: All steps in the process have been completed successfully. If the flow includes validation steps, all validation statuses are successful.
  • Failure: Can occur if the process is declined or expired, due to a timeout, or because of an internal error.

Appendix 1. Outbound Failure Reasons

Outbound Failure Reason Description
Business Account locked The WhatsApp line used in Truora was blocked by Meta.
Image file format not supported If the message contains an image, the format is not supported.
Invalid media size The size of the media attached to the message is not valid. This could be because the attachment is either too large or too small, according to the 15MB limit.
Invalid media URL The image or media file URL is either expired or incorrect.
Invalid parameter value in outbound template One or more parameters used in the message template have an invalid value or are incorrectly configured.
Invalid parameter One or more parameters in the message or in the flow are invalid.
Invalid WhatsApp number The WhatsApp number where the message is being sent is not valid or is incorrectly formatted.
It was not possible to confirm success or failure in the message sending The system could not obtain a clear confirmation of whether the message was successfully sent or if an error occurred during the sending process. This could be due to network connectivity issues, errors in the message delivery system, or temporary failures.
Media upload error There was a problem during the upload or sending process of a media file, such as an image, video, or audio.
Message failed to send due to an unknown error The message could not be sent due to an unidentified error.
Message sent to already expired WhatsApp session The message was sent to a WhatsApp session that has already expired or is no longer active.
Number of parameters provided does not match expected number of parameters An error occurred due to a mismatch between the number of parameters provided and the expected number of parameters.
Param text cannot have new-line/tab characters or more than 4 consecutive spaces The text parameter (typically used for message content) cannot contain new-line or tab characters, or more than 4 consecutive spaces.
Phone number not found in Whatsapp The phone number you are trying to message through WhatsApp is not associated with an active WhatsApp account. This could be due to a typo, the number not being registered, or the number being changed.
Receiver is incapable of receiving this message The recipient is unable to receive the message due to specific reasons, such as being blocked, account restrictions, technical issues, or an invalid or inactive phone number.
Recipient is not a valid WhatsApp user The phone number you are trying to message is not associated with a valid WhatsApp account.
Request to specified media URL failed The request to access the media resource (such as an image, video, or audio file) specified in the URL could not be completed successfully.
Send template message failed The attempt to send a message using a predefined WhatsApp template failed. This could be due to issues with the format, authorization, or restrictions. Sometimes, even if Meta approves an outbound template, it may block the message during delivery if it detects potential spam in the campaign.
Something went wrong This can be caused by network errors, server issues, programming errors, or others.
Spam Rate limit hit Messaging platforms like WhatsApp impose limits on the number of messages that can be sent within a specific period to prevent abuse and mass unsolicited messaging. If you accidentally hit the spam limit, you may need to wait for a certain period before sending more messages. In cases of severe abuse, your account may be temporarily suspended or restricted.
Templated messaging is disabled or Whatsapp session is already expired Templated messaging is disabled, or the WhatsApp session has already expired.
The amount of messages sent by this WABA exceeds its 24h limit This message indicates that the WhatsApp Business Account (WABA) has exceeded the limit of messages it can send within a 24-hour period. Meta imposes these limits to prevent spam and abuse.
User not opted in and inactive The user has not opted in to receive messages and is inactive, meaning they haven’t interacted recently with the account or service.
User WA version does not support message The message you are trying to send is not supported by the version of WhatsApp that the user is using.
User’s number is part of an experiment The user’s number is part of a controlled experiment in WhatsApp conducted by Meta, where certain users are blocked from receiving outbound messages. These numbers serve as a control group for marketing message delivery through the WhatsApp API.
WhatsApp Account does not exist The phone number or WhatsApp account you’re trying to message is not registered, has been deleted, or is blocked.
Your WhatsApp business account has been locked. Your WhatsApp account was locked by Meta, either due to policy violations or because it was flagged as spam.
Unable to deliver message. Confirm with the recipient that they agree to be contacted by you over WhatsApp and are using the latest version of WhatsApp This may happen if the user blocked the sender or is not using the latest version of WhatsApp.
Invalid user phone number The user’s phone number does not have the required digits to be a mobile number, or it is identified as not being a valid mobile number.
User phone number is duplicated The number is already present in the list one or more times. The message is sent once, and duplicates receive this failure message.
Message undeliverable This can be caused by network errors, server issues, programming errors, or others.
Wrong number format There are formatting errors in the phone number, such as parentheses, spaces, or other characters.
Invalid request: conversation already in progress (10400) The user already had an active conversation or was receiving an outbound message from the same line, so another message could not be sent.