Integrating your WordPress forms with Capsule CRM

Do you need to capture lead information through forms on your WordPress website and then pass that data easily into your external CRM system? We have recently completed a WordPress / GravityForms / Capsule CRM integration and explain how here...

How to pass data from WordPress into a CRM system such as Capsule

26 Jul, 2012
Martin Jarvis

Integrating WordPress / GravityForms / Capsule CRM

As WordPress becomes more of a mainstream website development application, rather than just a blogging tool, there is an increasing need to capture information and pass it to 3rd-party systems. Whenever there is a requirement to integrate WordPress with another system a plugin seems to pop up in quick time to fill the need, but sometimes these plugins just satisfy the most basic of requirements and so some additional customisation is necessary to get exactly the result you want.

One such situation occurred for us this week.

We had a client who wanted to capture information from 3 website forms (including 1 sidebar form) in their WordPress site, and then send this information to their Capsule CRM system and pass the visitor back to a thank you page on their website. The requirement was further complicated by the need to pass a number of custom fields to Capsule.

Our solution was to install the GravityForms plugin, creating the form(s) we needed and then dropping the form shortcode where we needed it on the site. This first bit is standard WordPress / GravityForms stuff. The trickier bit was actually getting the form submission process to kick-off the sending of the form field content to Capsule CRM. We did this by adding the following code to our theme functions.php file.

Strictly speaking, you shouldn’t really be editing your functions.php file – if you update your theme you may well lose your valuable customisations. Instead, call it from your child theme or add it to any ‘custom-‘ type of file (if specified by your theme).

PHP code to help integrate WordPress and GravityForms data with Capsule CRM

Notes for completing your WordPress Gravity Forms to Capsule CRM integration

  • Your Capsule form id goes into line 9;
  • Your successful completion url goes into line 10;
  • Each of your custom field names gets it’s own line like line 11. You’ll need to match up the field id that Gravity Forms gives each field with the corresponding Capsule CRM custom field name;
  • You can repeat this code for each different form that you have on your site, replacing the relevant function and form names;

Of course, there are plenty of other WordPress form plugins, and plenty of other CRMs, but hope fully this will help you get started.

2 Comments

    • Martin Jarvis

      Hi Paul.
      I’ve just taken a look at this plugin and tried to install it on my server. I couldn’t activate it because there is some code that needs php 5.3. I only have 5.2 on the server I was testing it on, so if you are also on a release less than 5.3 then this will be your problem.

      So, you can either get your web host to upgrade to php 5.3 (as recommended by the plugin owner) or try hacking the plugin code to make it work on your php version. To do this, you will need to edit line 12 in the file capsulecrm.php to replace __DIR__ with the full path to your CapsuleCRM plugin folder. Then, in file CapsuleCRMAPI.php replace lines 286 – 301 with this code.

      I’m not 100% sure that this plugin will then work without further modifications, but the steps above should get it activated for you.

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

You may also like…

Using WP-POLLS for my WordPress Polls and Surveys

Using WP-POLLS for my WordPress Polls and Surveys

Back in 2010 we started using the WP-POLLS plugin to add polls and surveys to one of our WordPress sites. 9 years on, is this still the best solution? Here’s our 2019 view on using polls and survey plugins in WordPress.

The importance of images in blog posts

The importance of images in blog posts

Website visitors really do respond more to content in posts that contain great images. Learn how to use images in your blog posts, and how to optimise them.

WordPress categories and tags in posts

WordPress categories and tags in posts

WordPress uses Categories and Tags to help group similar content together for easy reference. Make sure you have a strong strategy for using categories and tags to improve your visitor experience and help your SEO.

Share This

Please share if you've liked reading this

Share this post with your friends! It really helps us, and lets us know which content visitors like best - so we can write more like that!