When a customer is visiting your website, portal, or app — they might want to reach out to get help. Setting up a bot in these places will thus help your customers get help faster. Using parameters, you can fetch customer information and offer contextual help to your customers. With Freddy Self-service you can make use of default parameters (that we offer out of the box), and custom parameters (that you can set up).


You can choose to turn on any of the parameters that you want to include in the bot script. This will include the code for the parameters in the bot widget script. You can choose to prefill these parameters with the placeholders that you use in your support portal, website, mobile apps.

Now, when your customers use your portal, website, or app, these placeholders will be filled with values respective to the customer. Since these placeholders are now a part of the bot script, you can pass the parameters and their values to the bot to provide a personalized, customer experience.


TABLE OF CONTENTS


Deploying your bot:

You can generate the bot widget script from the Generate script page for each bot. You can copy and paste this script on all your support mediums (portals, webpages, etc.) to deploy it. Any changes you make to the bot configuration will automatically reflect in the bot widget, so you will need to paste this script only once on the required support mediums.


Note: If values are not passed for mandatory parameters, the bot widget will not load. To avoid this, you can prefill a default value for mandatory parameters in the Generate script page



A quick guide to setting up Default Parameters:

  • Login to your chatbot builder account as an Admin/Owner and select the bot you want to edit from the bot list page

  • Navigate to the Generate script menu item and you can see the list of default parameters that are available out of the box. The default parameters are as follows:


  • Name: Store your customer’s name
  • Email ID: Store your customer’s email address
  • Phone number: Store your customer’s phone number
  • Language: Store your customer’s preferred language
  • External Ticket ID: Store your external IDs, like your customer’s order ID or transaction ID (for example) that you use to maintain different bot conversations for the same customer
  • Customer ID: Store your customer’s unique ID to manage multiple sessions across devices
  • Authentication ID: Store and pass the Auth ID for making API calls 


A quick guide to setting up custom parameters:

Sometimes the parameters for their information may not be readily available as a placeholder. In that case, you can make use of the new custom parameters that we offer to fetch this information.

  • Login to your chatbot builder account as an Admin/Owner and select the bot you want to edit from the bot list page. Click on New Message > Click the > Parameters > + New parameter from the list. Alternatively, you can also click on Flows > Configure > Custom parameters from the menu.
  • Give your parameter a name
  • Select the Source from the drop-down:
    • JS: If the source is selected as JS, you can choose to save the information as part of either the ticket details or the customer details. When JS is chosen, the script that is generated upon clicking the Generate script button will contain this parameter as a variable. This variable will be a key with its value either hardcoded or fetched dynamically and assigned from the website the script is to be pasted on.



Note: If the custom param of Source JS is marked as mandatory, make sure that the value is available and is fetched from the website for the defined variable - the bot will not load otherwise.


  • API: If the source is selected as API, you will be able to select the required response parameters of an API from the API library of that bot to initialize the custom parameter. Once this API is called in a flow the custom parameter assumes the value of the response parameters mapped to it.


While setting up the script to embed the bot widget, you can notice how the embed code will contain the default and the custom parameter values. You can even populate these values using liquid placeholders on the Generate script screen. You can also populate these values with a JS function response.



In this example, we’ve set up the bot script to have two default parameters and two custom parameters. We are also prefilling one of each. Notice that the prefilled values are also part of the script. You can choose to prefill them constantly or have a variable that can be populated with a JS function on your website.



A quick guide to using Parameters:

  • In the chatbot flow, select the dialog where you want to use the default parameter. Click on New Message > Click the > and choose Parameter from the list of placeholders.

  • All parameters associated with the bot will be listed here. You will see the list of the default parameters followed by the list of custom parameters. Click on the specific parameters to add them to the message.


Note: Make sure that the API related to the custom param is being called under the Actions tab before using it in a dialog - the values will be fetched only if the API is configured as part of Trigger API under Actions.


Please write to freshbots-support@freshworks.com if you have any more questions; we’ll be happy to help you.