Code to get form data as XML



I am trying to pass data as XML from the unbounce form to a third party CRM.

I am getting correct response from the CRM but not sure how to use the data from the form in my code. How do I retrieve the data from to form as XML fields in the code?



Hi @Avi_Theret,

The Unbounce webhook does send the data in XML format in addition to JSON.

Here you can find a bit more documentation about the webhook feature.

Maybe your 3rd party CRM expects the data in a particular oder/format or maybe needs some kind of authentication to process it?

My company has developed over 40 custom integrations for Unbounce so feel free to PM me with a bit more details.



Hey Hristian,

Thanks for your quick reply :wink:

I really only need help with the correct way of passing the data to the code I have written which is working when I manually add the XML fields (see attached).

The rest is working fine.



You seem to be on the right path.

You just need to list out and map your Unbounce fields to the corresponding XML fields.

Something like this:

(this is just an example from another script I worked on so you need to adjust it based on your page and XML feed).



Thanks again :wink:

Followed your code. I’m getting a code 4 ‘No input was received.’ result.

Am I missing something really obvious?


@Avi_Theret based on a quick look… in your curl you are looking for “xml” when actually you should be looking for “xmlcontent”.


Hey Hristian,

I have changed to ‘$xmlcontent’ and also added content type text/xml.

Now getting a different error. Although the http request gets a 200 response it doesn’t receive the data… (see attached).

Getting confused now :wink:


Hi @Avi_Theret,

There are too many moving parts here for me to be able to troubleshoot it from a few screenshots.

PM me the landing page URL, the full script and also the documentation for this service.