How to write a webhook url POST to import unBounce form fields

Highlighted
Occasional Contributor

How to write a webhook url POST to import unBounce form fields

I am currently using unBounce lead page with their Constant Contact integration. This integration only sends CC firs/last name and email address.

I need to also bring in State and a custom field called 'what_is_your_role_at_the_association'

 

Is there a way to have a URL something like:

https://api.constantcontact.com/{first name}{last name}{email address}{state}{custom_field1.what_is_your_role_at_the_association}{email_list.SEM contacts}

 

The webhook would then bypass the Constant Contact integration, sending all information with the webhook

 

Any assistance appreciated.

13 REPLIES 13
Highlighted

Re: How to write a webhook url POST to import unBounce form fields

curious...where are you putting this? I am not a user of unbounce.

Highlighted
Occasional Contributor

Re: How to write a webhook url POST to import unBounce form fields

When you are in your admin for a landing page, they have a box to add a URL Post in place of other types of integrations.

It's written in their system I suppose that if a URL POST is added, their system knows to use it.

Highlighted
Honored Contributor

Re: How to write a webhook url POST to import unBounce form fields

Hello,

 

Based on what you're looking for, it is possible that the new sign-up forms and POST URL we created a little while back may serve your needs. However, the POST URL does have some some specific rules about how content is sent to us. You can read more about the POST URL here: http://techblog.constantcontact.com/api/release-updates/announcing-a-new-signup-form-post-url/

 

Unfortunately I am not familiar enough with Unbounce to say for sure if their system is able to format the data properly to make use of this POST URL. However, if you have any questions, I am happy to help as much as I am able!

 

Sincerely,

Elijah G.
API Support Engineer
Highlighted
Occasional Contributor

Re: How to write a webhook url POST to import unBounce form fields

Thanks, I did see that. It looks like I could pass the state from unBounce, but there is one custom field of role:

<form_data>
        <first_name>randy</first_name>
        <last_name>testTest</last_name>
        <email>test@test.com</email>
        <state>California</state>
        <what_is_your_role_at_the_association>Volunteer Boardmember</what_is_your_role_at_the_association>
     </form_data>

 

In the new signup API, do you offer a custom field in which this <what_is_your_role_at_the_association>

could also be passed?

Highlighted
Honored Contributor

Re: How to write a webhook url POST to import unBounce form fields

Hello,

 

Technically there is a method for sending custom field data, but the specifics are unique to each account, so it exists as an undocumented feature. If you wish to import a custom field to your account through this, you would need to do as follows:

  1. Make sure that the desired custom field exists in your account
  2. Create a sign-up form in your account that uses this custom field
  3. Get the embeddable code for the form
  4. Find all fields on the form related to the Custom Field to use in your implementation.

In my form there were 3 form fields (two hidden) per custom field. Here is an example of the HTML for "Custom Field 5" in my account:

<input data-id="Custom field 5_value:input" type="text" name="cf_text_value--0" value=""></p><input data-id="Custom field 5_name:input" type="hidden" name="cf_text_name--0" value="custom_field_5"><input data-id="Custom field 5_label:input" type="hidden" name="cf_text_label--0" value="Custom field 5">  

In order for this to work with the POST URL, you need to capture all three of these fields in the data sent to Constant Contact.

 

If you have any questions, please let me know!

 

Sincerely,

 

 

 

Elijah G.
API Support Engineer
Highlighted
Occasional Contributor

Re: How to write a webhook url POST to import unBounce form fields

Hello,

 

I am just getting back with this.

I have setup a form with the custom field.

I named it the same as what unBounce passes 'What is your role at the Association:

<what_is_your_role_at_the_association>Volunteer Boardmember</what_is_your_role_at_the_association>

 

I am not clear if I need to add all of the fields key and values(turn more into GET) something like this:

https://visitor2.constantcontact.com/api/signup?ca=xxxx&email={email}&first_name=xxxxx&last_name={la...

 

or just use this for the POST url:

https://visitor2.constantcontact.com/api/signup?ca=xxxxx&email=example@madeupdomain.com&first_name=J...

 

Is email in this POST the constant contact account email?

The API itself brings in all fo the fields. as well as the custom field as long as they match?

 

Thanks for your assistance.

Highlighted
Honored Contributor

Re: How to write a webhook url POST to import unBounce form fields

Hello,

 

You can take either approach. You can place all of the data into the URL as parameters, or you can send it in the body of the request using the "application/x-www-form-urlencoded" header and format for the data.

 

Sincerely,

Elijah G.
API Support Engineer
Highlighted
Occasional Contributor

Re: How to write a webhook url POST to import unBounce form fields

I see. Well, I will need to pass all parameters since I do not have access to any other code with unBounce.

 

Since this is not PHP, I am not sure how the key and value should look within the POST url. Would you mind providing an example?

 

Example:

https://visitor2.constantcontact.com/api/signup?ca=xxxxx&email={email}&first_name=Cathy&last_name={l...

Highlighted
Honored Contributor

Re: How to write a webhook url POST to import unBounce form fields

Hello,

 

If I use your example with the data from my custom field, this is what it would look like:

https://visitor2.constantcontact.com/api/signup?ca=xxxxx&email={email}&first_name=Cathy&last_name={last_name}&state={state}&list=1512077148&cf_text_value--0={what_is_your_role_at_the_association}&cf_text_name--0=custom_field_5&cf_text_label--0=Custom field 5

The important part that you'll note is that I included all three parts of the custom field, including the two hidden fields. This is requiredto be able to import custom field data in this manner. The names and values for the hidden fields should be exactly as you see them in the Signup Form HTML code.

 

If I can provide any additional guidance, please let me know!

 

Sincerely,

 

Elijah G.
API Support Engineer
Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Constant Contact Would Like To Hear From You!

We want to hear from customers like you about your favorite features and how they have helped your business or organization. Tell us by answering a few questions in...

Read More
Featured