Introduction

Webview Node is an Integration capability from Lead Robots for enabling advanced use cases like payments, OAUTH & more that involve a third party web interface for taking user inputs for authentication or simple data inputs. Further, configuration parameters for Stripe and Google OAUTH have been built in to make it even easier for you to use them within your conversation flows in the Lead Robots Bot.


Use Cases 

1. Payment

Now a bot builder can set up a method to receive payments through the bot using the Webview node. The Webview node provides configuration for payment setup through stripe and at the same time gives freedom to the bot builder to use any payment gateway using a custom setup.


Let’s consider a simple example here – A Gym uses a chatbot to engage users interested in its membership. Now the chatbot can support letting the user select the subscription plan and pay for it. 


2. OAuth 2.0

This node will also help set up OAUTH authentication to be completed within the conversation flow. The node comes pre-configured for required params for Google and can be used for many more systems using OAUTH > Other settings.

Let us consider a simple example here – where a user may want to design a conversation flow where the user has to authenticate with Google to allow the chatbot access some files from Google Drive. Really helpful in cases, where you want to enable integrations with cloud systems that require OAUTH 2.0 based authentication. 


3.Custom

Custom Setup helps integrate with any other similar services that require the user to enter data on their website and convey the success back to Lead Robots using a Callback. This could include other payment gateways or even services like JotForm that allow you to build custom forms and use them on your website or via the chatbot in this case. 


Setup Examples

1. Stripe

Configuration to add payments functionalities to a bot using Webview node.


Setting up stripe using Webview node to setup up payment collection mechanism


Step 1:  Add Publisher key and secret key provided with your account from strip.

*Payment method type is fixed. The user can only make card payments.             

Step 2:  Enter the Item Name: This can be taken as an attribute and also from a JSON call

Step 4:  Enter Amount: This specifies the unit price of the product selected 

Step 3:  Enter Item Quantity: This specifies the quantity of the product  selected

Step 5:  Select the currency in which the amount is to be collected 

Conversion: This helps to break down the selected currency in smaller  denominations

Collect Billing Address: This would record billing address with stripe and is not sent back to the bot.

During the bot flow, Webview node will direct the end-user to a pop-up window which will process payments for stripe. Once the payment is successful, a user is redirected back to the bot. 


If there is an error in the payment process, a bot builder can define the flow of the bot.

For more information on stripe currencies and  minimum and maximum value, please refer https://stripe.com/docs/currencies 


2. Google

A bot builder can set up a user to be authenticated against Google using OAUTH 2.0. 


Callback URL: This is configured on the service, Google in this case, that we want the user to be authenticated against. Once authentication is completed, Google will use the configured Callback URL to send the authentication details & status back to Lead Robots. For Google, you can configure it here – 

  1. Add in Authorised Domains “leadrobots.com”

          Console.google.com>APIs>OAuth Consent Screen


2. Add in Authorised redirect URL

https://app.leadrobots.com/web-view-redirect/bot

Console.google.com>APIs>Credentials>app