Pass custom fields to your bot through your URL

In this article, we will cover how you can pass data to each of your custom fields through your URL.

We will cover:

How to pass Email field

Here is an example of how to pass an email field:

example-website.com?cx__email=john%40example.com
Note: "%40" is used when trying to place "@"

Here is step by step how to do pass email field:

1. You add your website URL:

example-website.com

2. You add the "?" at the end of your URL:

example-website.com ?

3. Next step is to add the name of the field you want to pass:

example-website.com? cx__email

4. Add an "=" before entering the value for this field

example-website.com?cx__email =

5. Add the value of this field

example-website.com?cx__name =john40%example.com

Passing name field

Once you have passed the email field, you can begin to add any other fields. It doesn't matter what order these fields get added. It is important to note that you are able to pass the @name field but not @first_name field in the URL. This is because the first name if a truncated version of the name variable.

Here is an example:

example-website.com?cx__name=Peter

1. You add your website URL:

example-website.com

2. You add the "?" at the end of your URL:

example-website.com ?

3. Next step is to add the name of the custom field you want to pass:

example-website.com? cx__name

4. Add an "=" before entering the value for this custom field

example-website.com?cx__name =

5. Add the value of this custom field

example-website.com?cx__name= Peter

Passing more than 1 field

So if you want to send more than one field in your URL you need to add  "&" between each field.

Here is an example of passing "Peter" to the name field and "Continually" to the company field:

example-website.com?cx__name=Peter&cx__company=Continually

Adding spaces

If you want to send a value with 2 words to your field you will have to add "%20" between each word to add a space.

Here is an example of passing "Big Company Name" to the company field. We will need to add %20 for the spaces between this name:

example-website.com?cx__company=Big%20Company%20Name

Adding "@" for emails

If you are wanting to send email field you will need to add "40%" instead of an "@" for the email address.

Here is an example where the email I want to pass is john@example.com but we will have to replace the "@"

example-website.com?cx__email=john%40example.com

Detailed Example

let’s say we know the lead’s data such as name, email, company and we want to feed these fields to the bot.
name: Paul 
email: paul@continual.ly
company: Continually
We will construct the link as follows:
example-website.com?cx__name=Paul&cx__email=paul%40continual.ly&cx__company=Continually
This means that when trying to capture any information from your visitor the field will be pre-filled for them. This also means you can pass fields like @name and use them in your messages to make the conversation more personal.
This is how the bot will look like after the visitor clicks on the link:

Now when the visitor interacts with the bot, all the fields you passed through the URL will be added as lead’s data on your Leads page.

Note: Passing fields through the URL won't work in the preview mode, you must use a real website or a landing page.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.