​Basics of Azure Bot Service

If you are new to Azure, you can learn the basics here and also learn to integrate the Azure services with the Zobot.

Creating an Azure Bot Service and Integrating it with the Zobot

There are a lot of services available for integration and you can integrate any service with azure and deploy the bot created using Microsoft Azure in the Zobot. Here, we are using Github as an example to explain the basics of Azure. 

ExTo create an Azure Bot Service and host a GitHub project: 

  • Login to Microsoft Azure.
  • In the Azure dashboard, navigate to Bot Services. When you hover over the option, you will be able to see the list of services that you have created so far.

  • Click on Bot Services > Add and create a new service.

  • You will have two options to create a service - Web App Bot and Bot Channels Registration​. 

  • Choose the option of your choice and create a service.

Option 1: Web App Bot

Option 2: Bot Channels Registration

  • Once the service is created, click on the service and navigate to App Service Settings > All App Service Settings > Deployment Center. 

  • Choose GitHub .

  • Then choose App Service Build Service.

  • Configure the organization, repository, and branch for the service. Click on Continue.

  • The repository will be added and you will be able to see the summary of the added repository.

Using Dynamic Text in Response

The text that can change is termed as "Dynamic Text". Messages will be conveyed dynamically from one visitor to the other as mentioned in the defined rule. The dynamic text will be auto-populated when the "%" symbol is typed along with the message. Zoho SalesIQ supports Dynamic text in Azure Bot Service responses and so you can use the dynamic text in trigger messages and chat responses.

How to use dynamic text? 

Using dynamic text in trigger messages:

  • In Zobot dashboard > Trigger Message text box, type % followed by the format along with the message.
  • Messages will be triggered dynamically to each visitor.

List of dynamic text you can use in your triggers messages:

Dynamic Text FormatWhat it representsUse in Trigger MessageUse in Azure Responses
%visitor.name%Name of the visitor on the website.
%visitor.id%Reference ID for the visitor on the website. 
%visitor.email%Email Address of the visitor on the website.
%visitor.phone%The contact number of the visitor.
%visitor.department%Name of the department to which the visitor has initiated the chat.
%visitor.question%The question raised by the visitor while initiating the chat. 
%visitor.ip%The IP address of the visitor visiting the website.
%attender.name%Name of the operator attending the chat.
%visitor.pagetitle%Title of the page, from where the visitor has initiated the chat.
%visitor.pageurl%URL of the page, from where the visitor has initiated the chat.
%visitor.referrer%Source from where the visitor is referred from.
%visitor.state%State/Province of the visitor.
%visitor.city%City of the visitor.
%visitor.country%Country of the visitor accessing the website.
%visitor.timezone%Time zone of the visitor accessing the website.
%visitor.latitude%Latitude of the visitor. 
%visitor.longitude%Longitude of the visitor. 
%visitor.operating.system%The operating system used by the visitor.
%visitor.browser%The browser used by the visitor.
%visitor.browser.version%The version of the browser used by the visitor. 
%web.embed.name%The web embed where the visitor has initiated the chat.
%platform%The platform used by the visitors in their system. 
%screen.resolution%Screen resolution of the visitor's system. 
%search.engine%Search engine used by the visitor to reach the website. 
%search.query%Search Query (Keyword)used by the visitor to reach the website. 
%attender.email%The email address of the attender who attends the chat.
%smart.timenow%Time period in the sequence of the day (Eg. Morning, Evening).
%company.name%Company name mentioned in Clearbit.
%company.type%Company type mentioned in Clearbit.
%company.sector%Company sector mentioned in Clearbit.
%company.location%Company location mentioned in Clearbit.
%company.website%Company website mentioned in Clearbit.
%company.employeecount%Company's employee count mentioned in Clearbit.
%company.annualrevenue%Company's annual revenue mentioned in Clearbit.
%company.marketcapital%Company's market capital mentioned in Clearbit.
%company.fundraised%Company fund details present in Clearbit.
%company.twitterfollowers%Your company's Twitter followers from Clearbit.
%company.facebooklikes%The likes you got in Facebook registered in Clearbit.
%company.industrytype%The industry type your company belongs to.

Note: Some of the dynamic text might not work in the Zobot preview window. 

Passing visitor info and attachments

Visitor info will be passed on to Microsoft Azure for framing a response based on visitor information like name, visitor region, etc. and will be available inside channelData. Here, two objects will be received: 

  1. visitor - you can retrieve the visitor info mentioned here 
  2. attachments - if the visitor attaches a file during a bot conversation, it will be available inside this object. Otherwise, an empty array will be passed.
"channelData" : 
{
      "attachments": [
        {
          "name": "Screenshot.png",
          "url": "https://salesiq.zoho.com/api/v2/vicky123/attachments/330340647f6b1386d7373d2b2933b0fde58837d874086b95b2909d87f663272f5aba596670294baa?file_name=Screenshot.png&chat_id=LD_2242276011928302370_1664693403&purpose=chat_attachment",
          "contenttype": "image/png"
        }
      ],
      "visitor": {
        "current_page_url": "http://htmledit.squarefree.com/",
        "uvid": "fbe9a8d9-d1be-4799-b2ff-f64573f4eb92",
        "landing_page_url": "http://htmledit.squarefree.com/",
        "last_call_attender": "318242000000556023",
        "in_time": "1561026289397",
        "uts_session_id": "-8438009772243006363",
        "browser": "Google Chrome",
        "country": "",
        "ip": "125.19.26.35",
        "country_code": "IN",
        "language": "en",
        "question": "hi",
        "phone": "",
        "number_of_past_chats": "1",
        "lead_score": "1",
        "number_of_past_visits": "1",
        "visitid": 252,
        "visitor_id": 318242000001314000,
        "os": "Apple Macintosh",
        "email": "",
        "name": "Visitor 974826",
        "uuid": "e6c49e0c-fbf0-4b1d-86b2-b7db6cf6f13b_a0",
        "department_id": 318242000000002000
      }
  }