Using webhooks within your bots

Using webhooks within your bots

Webhooks allow you to use real time information within your Webio bots.  This can be used to provide up to date information within the conversation or to configure logic decisions within your bot based on information provided from your internal systems. 

Quick Trick: Add in <<fieldnames>> within your bot where you want the retrieved value to appear.  

Endpoints not integrated yet?  Integrate Endpoint.

You can add in realtime values within your message content or within a logical branch condition. 

Message content

1) Click into the step on your bot that you want to include realtime value(s).   Type the message content in the Outgoing message box, where you want to insert a realtime value use the <<fieldname>> .

Let's look at an example.

I want to send a message that contains a realtime value for the amount that is arranged and the date that the payment is due.  I want to get these values in realtime from my internal systems using the webhook endpoint set within my Organisation.   First I need to check what the field names are within my internal system, for this example these are "arrangementamount" and "duedate".

I can now build these values into the outgoing message where I want them to be inserted. 



When this message is triggered by the bot, a webhook request for these values will be sent to to the endpoint in my organisation.  The values returned will be populated into the message and sent before the bot moves to the Next step.  If the webhook request isn't successful, the bot will go down the Failure Step route (set to step 8 in our example above).

Using realtime values to make logical decision

You can add in realtime values to logical branch steps and route the bot dependent on the response returned. 

Add conditions into your logical branch steps using the <<value>> to compare system values with realtime ones. 

Let's check another example.  I want to ask a customer to provide me their name and the verify that this matches that value we have against that phone number in our internal systems. 

The first step I need is a listening step to gather the name from the customer.  The Value To Gather is important here as this is the field name I am going to compare against shortly.  In this example I've called it "Fullname customer".  You can call yours what you want, but make sure it is different to the realtime value name you are going to be requesting.   For this value the type will be data, if I were requesting a reference number I may wish to store it as a Customer ID (this would then be passed across in the request CustomerUID value). 



Now I save this step and create another step that uses a logical branch condition to compare the value I have gathered from the Listening Step #FullName customer# to the realtime value I want to request from my internal systems <<fullname>>.


To add the condition I select the field name I set as the Value To Gather from the listening step, this will appear in the dropdown.  Select the logic I want to apply, (in this example I've chosen Is equal to), then enter the real time value field name in the Value box.  Finally I tell the bot where to go if this condition matches and select Update Condition.


I also need to set the default path for anything that doesn't match the logic conditions.


    • Related Articles

    • Webio Webhooks

      Quick trick: click into organisations, scroll down to Webhooks, click create Webhook, enter the callback URL, select the events you want to subscribe to and click create. This documentation covers Webhooks creation process on on our Old UI. If you ...
    • Creating Simple Bots

      Overview The simplest bot you can create is a one step information bot. This will send a message to the recipient. The documentation below describes how to build a Bot on our Old UI. If you are looking for our new Web App documentation please follow ...
    • Webio Webhook - What it does

      Using Webio's webhook you can configure your endpoints within your Webio organisation to post or retrieve data. Identifying the request is from us To identify the request as originating from Webio, first use the API to generate a JWT token. Haven't ...
    • Change Update - Webhooks

      Following feedback we are updating our webhooks for the events messageStatusUpdate, inboundMessage and messageSend.  The messageStatusUpdate and inboundMessage will include additional fields and the messageSend will now be sent on a new type =  ...
    • Versioning of Bots

      Quick Trick:  Click into edit your Bot, select version, click REVERT TO VERSION You can quickly and easily revert to previous versions of your bots. Step 1 Click the edit icon (pen) next to the Bot you wish to view/alter version history for.  At the ...