Question

Checkbox value true/false json webhook

  • 3 January 2024
  • 4 replies
  • 95 views

Userlevel 1

I’m setting up a webhook from an Unbounce form to our CRM. I’m able to all our standard information from the form into the CRM except a checkbox asking if someone opts into marketing materials. The CRM API works with json and only accepts values for that opt-in field as true/false. I tried two different set ups.

Adding the data as I would normally thinking that it would automatically send it as true/false since there is only one box. However, the value isn’t considered true but the value of the checkbox itself. 

 

I then tried the Formatter by Zapier to change the value of the checkbox field. I set it up as a Utility and then selected Lookup Table. I put the full checkbox answer in the left and true on the right.  

 

From there, I was able to add the Formatter field to the webhook and the value does say true. Yet, it will not load in the CRM. 

 

Any help would be greatly appreciated! 


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

4 replies

Userlevel 7
Badge +14

Hi @jordanjacoby 

We would need the link to the CRM API endpoint docs you are referencing as well as more screenshots that show how your entire Webhook Zap step is configured. (e.g. Method, URL, Headers)

Userlevel 1

Ok update - The field was not published for the API and it’s now pushing through however it’s causing a 400 error of “Illegal assignment from string to Boolean.” The last issue I’m running into is the formatting of that text opt-in field. The value needs to be true without quotes but the webhook is sending it with quotes as a string. The rest of the data is loading correctly with the quotes, as a string.

 

Method is POST with headers of Content-Type:Application/JSON. Here’s a section of the API Instructions:

 

I have the value in the Formatter as true but I’m wondering, do I need to set it up differently so it’s not a value creating a string or is there a way to modify that specific value so it isn’t a string? 

 

 

Sorry, not a developer, just a marketing person so I have limited knowledge on the subject. I’m connecting into a Salesforce based platform.

 

Here’s the screenshot of the log: 

 

Userlevel 7
Badge +14

@jordanjacoby 

There are quotes around the “true”, but it expects without quotes like this.

 

You may want to try creating a custom action with the help of AI.

 

Otherwise, you can use a Custom Request to do the HTTP request and use JSON to format the Body Data.

 

Userlevel 1

Thank you! I was able to achieve it with the Custom Request.