Adding variables for the Child bot

Let's start by creating the variables we will use to populate and invoke the Twilio API. We will also create a variable that will send the response back to the Parent bot. 

For the variables that need to receive data from the Parent bot, select the Use as input option. For the ones that we need to send back, we will select the Use as output option.

Let's add the following variables, which we'll pass from the Parent bot in order to invoke Twilio. Choose the Use as input option for all these variables:

  • SenderPhoneNumber: This is a String variable that will be used to hold the phone number we will use to call employees.
  • RecieverPhoneNumber: This is a String variable that we will pass employee phone numbers through. 
  • RecieverName: This is a String variable that will be used to pass the employee names.
  • MessageContent: This is a String variable that will be used to pass the emergency notification message body.
  • URI: This is a String variable that will be used to pass the request URI for the POST method. 
The URI should be in the following format: https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages.json. Note that ACXXXX... is where you need to place your Twilio SID.

Finally, let's add the response flag we will send back to the Parent bot. Choose the Use as output option for this variable:

  • Response: This is a String variable that we will pass as either Good or Bad to the Parent bot. 

Now that we have the necessary variables, we are ready to invoke Twilio.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.102.138