Sometimes it’s obvious a company has a decent software product but there’s one part of their development they don’t put enough time and resources into.  For InfusionSoft, it’s their documentation, support, and their API.  It’s a pretty powerful tool for normal companies, like WordPress is great for most websites, but your company isn’t like most companies, is it?

All built-in InfusionSoft database table field names for any contact record and other records, like for campaigns, vendors, etc can be found at:  https://developer.infusionsoft.com/docs/table-schema/

Apparently, the two guys in the garage that cobbled this CRM together initially before handing it over to a larger team of developers now stuck in the initial constraints of the system they designed set some immovable and immutable rules that leaves any web developer with the sense of when using their API they’re dealing with some pretty old technology and design concepts that just won’t go away for the sake of better usability, speed, and stability.  The irony here is that if InfusionSoft improved their API, documentation and sped their platform up they would get more customers and make more money.

When searching for an InfusionSoft custom field that you want to check if it’s empty, you can use the search value of “~null~”, which the InfusionSoft developers created to define a blank field.

$queryArr = array('_customField'=> '~null~' );
$returnFieldsArr= array('Id','Email','LastName','Phone');
$resultsArr=$app->dsQuery("Contact",99,0,$queryArr,$returnFieldsArr);

This will return all contact records that were never populated with a value before, whatever the “_customField” for your system is.

Remember that ALL CUSTOM FIELDS in InfusionSoft are accessed with a leading underscore (“_”), by the way.   It’s not our place to ask why, that’s just the way they designed the system.

The code below will find all contact records at least once had the custom field populated but is currently empty or null:

$queryArr = array('_customField'=>'' );
$returnFieldsArr= array('Id','Email','LastName','Phone');
$contacts=$app->dsQuery("Contact",99,0,$queryArr ,$returnFieldsArr);

You only need to use the “~null~” parameter in these InfusionSoft API queries for your custom fields, of course, right?!  Why not “tilde null tilde”?!  Good grief…  For InfusionSoft’s standard fields, you can use the familiar empty string “” query and that will return all currently empty values, regardless if it they were ever populated or not.  InfusionSoft is a bit clunky and behind the times in some ways, in other ways, you may find it is a useful tool for your company.  I think it’s overpriced, but most CRMs are.  Look into Open ERP first, I think it’s still free though I see it was taken over by Odoo.  InfusionSoft’s just not meant to be strong and flexible for companies that have challenges more diverse than the cookie cutter solutions they provide, companies with many different groups of contacts, customers, and data sets may find their API is too slow to interface with their database and systems.


Love Infusionsoft or hate it, if you are stuck using it, you want to be able to deploy useful forms with fields that optimize your visitors’ UX.  If you are collecting date information, Infusionsoft forms don’t export the code with any built-in AJAX functionality.  None. Someone made a conscious decision there to do the bare minimum in making sure this CRM’s capabilities could deploy forms.

Plugging your Infusionsoft form into a CMS like WordPress should be as simple as copy and paste, but unless you’re making really simple forms, good luck with that.  With their web interface, they took jQuery drag and drop and AJAXed so much of their interface, yet, the forms you create from a campaign are all designed to be simple standalone pages, there’s no choice to get code to work within an existing page — figure that one out.

That’s the biggest reason I don’t particularly care for Infusionsoft, the code they generate for simple forms is bloated, clunky, and it is not encapsulated to allow you to paste easily into existing web pages without it being likely to interfere somehow with other code on your page.  Wouldn’t it be nice if the campaign form generator asked you whether your JQuery library is loaded and what version you use?  You know, keep the customer happy kind of features?

I’m sure they offer upsells or other plug-ins that can turn your Infusionsoft forms into simple AJAX WordPress on-any-page widgets, but for the cost of this system, I think they need to get their act together and catch up to the more modern forms out there that plays nicely with other systems and performs simple AJAX out of the box.

So, if you are looking for a simple way to add a datepicker widget to your form, the best thing to do is add hidden HTML to your Infusionsoft form and follow the instructions I eventually found here:

http://ug.infusionsoft.com/article/AA-00840/0/Add-a-calendar-date-picker-to-a-web-form.html

For your convenience, here’s the snippet that goes into the html form element.

<link rel="stylesheet" type="text/css" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/themes/base/jquery-ui.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js" type="text/javascript">
</script>
<script type="text/javascript">
jQuery('#inf_field_YourDateField').datepicker();
</script>

Why it’s just not a simple option for form elements or they just have a “date” widget like most frameworks is a poor oversight.  As frequent and common date fields are, don’t get me started with Infusionsoft.  There are some great things about their system but I often wonder if they listen to their users.  It’s just common sense to offer robust form creation leveraging the newest technologies to offer the best UX, but then again, Infusionsoft often feels (and looks) like it was designed without a clear plan and where common sense was an after thought.  Don’t get me wrong, Infusionsoft has potential, but it is bloated, slow, and the API is strangely limited in its capabilities, which in turn limits the businesses (you know, their paying customers) that use it.

By the way, with the above snippet, you have to change the jQuery selector from ‘#inf_field_YourDateField’ to the field name from your particular form.