=== Gravity Forms Salesforce Add-on === Tags: gravity forms, forms, gravity, form, crm, gravity form, salesforce, salesforce plugin, form, forms, gravity, gravity form, gravity forms, secure form, simplemodal contact form, wp contact form, widget, sales force, customer, contact, contacts, address, addresses, address book, web to lead, web to case, web-to-lead, web-to-case, cases, leads, lead Requires at least: 3.3 Tested up to: 3.8 Stable tag: trunk Contributors: katzwebdesign,katzwebservices Donate link:https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=zackkatz%40gmail%2ecom&item_name=Gravity%20Forms%20Salesforce%20Addon&no_shipping=0&no_note=1&tax=0¤cy_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8 License: GPLv2 or later Integrate the remarkable Gravity Forms plugin with Salesforce. == Description == ### This is *the* best WordPress Salesforce plugin. ### Integrate Your Forms with Salesforce Add one setting, check a box when configuring your forms, and all your form entries will be added to Salesforce from now on. Integrating with Salesforce has never been so simple. ###Gravity Forms + Salesforce = A Powerful Combination This free Salesforce Add-On for Gravity Forms adds contacts into Salesforce automatically, making customer relationship management simple. The setup process takes a few minutes, and your contact form will be linked with Salesforce. #### Now with Custom Field support! #### Read the FAQ for information on how to integrate with Custom Fields. #### Using the API If you have the following Salesforce Editions, you can use the included API Add-on: * Enterprise Edition * Unlimited Edition * Developer Edition If you use the following Editions, you will use the included Web-to-Lead Add-on: - Personal Edition - Group Edition - Professional Edition
*Note: You can also purchase API access for a Professional Edition.* ### Web to Case When using the Web-to-Lead Add-on, you can choose to have form entries sent to Salesforce as Cases (like when using the Web-to-Case form) instead of as Leads. #### Other Gravity Forms Add-ons: * Gravity Forms Highrise Add-on - Integrate Gravity Forms with Highrise, a CRM * Gravity Forms Directory & Addons - Turn Gravity Forms into a WordPress Directory plugin. * Gravity Forms + Constant Contact - If you use Constant Contact and Gravity Forms, this plugin is for you. * Gravity Forms ExactTarget Add-on - Integrate Gravity Forms with ExactTarget If you have questions, comments, or issues with this plugin, please leave your feedback on the Plugin Support Forum. == Screenshots == 1. Configure Salesforce field mapping. Set up custom objects. 1. Integrate with more than one form. 3. Salesforce.com settings page 4. Web-To-Lead: View of Form Feeds. You can have multiple feeds for each form. 5. Web-To-Lead: View of the Web-To-Lead Settings screen. 6. Web-To-Lead: You can easily configure the field mapping for export to Salesforce using Feeds. 7. Web-To-Lead: The plugin integrates with the [Gravity Forms Logging Tool](http://gravityhelp.com/downloads/#Gravity_Forms_Logging_Tool) to log all activity and/or errors. 8. Web-To-Lead: Specify custom fields and use the Salesforce API ID to send additional data to Salesforce. == Installation == 1. Upload plugin files to your plugins folder, or install using WordPress' built-in Add New Plugin installer 1. Activate the plugin 1. Go to the plugin settings page (under Forms > Settings > Salesforce) 1. Enter the information requested by the plugin. 1. Click Save Settings. 1. If the settings are correct, it will say so. 1. Follow on-screen instructions for integrating with Salesforce. __If you are using the Web-To-Lead Add-on__ you must have Web-To-Lead enabled. [Read how to enable Web-to-Lead on Salesforce.com](https://help.salesforce.com/apex/HTViewHelpDoc?id=setting_up_web-to-lead.htm). == Frequently Asked Questions == = Web-to-Lead: I'm not seeing any errors, but the entry didn't get added to Salesforce! = Please check the box "Enable Salesforce debugging emails" in the Web-to-Lead settings page. Salesforce will send you an email with a reason the lead or case wasn't added. = Web-to-Lead: How do I convert my existing form configuration to Feeds? = See "Web-to-Lead: How do I create a Feed" below. = Web-to-Lead: How do I create a Feed? = __To create a feed:__ 1. Go to "Forms" in your admin 1. Click on the name of the form you want to link with Salesforce 1. Hover over "Form Settings" and click on the "Salesforce: Web-to-Lead" link 1. Follow the instructions to create a Feed. = Web-to-Lead: How do I modify the debug email address? = The Salesforce debugging emails are sent to the website administrator by default. To modify this, add a filter to `gf_salesforce_salesforce_debug_email_address` that returns an email address. = Web-to-Lead: How do I add an entry to a Campaign? = To associate a Web-to-Lead with a Campaign, you must also set the "Member Status". [Read the Salesforce help article](http://help.salesforce.com/apex/HTViewSolution?id=000006417) * Add two fields to your form: 1. "Campaign ID" - The "Campaign ID" form field will be a hidden field. Add a hidden field, click the "Advanced" tab, and add the ID of the Campaign you want to add the entry to (it will look something like `902A0000000aBC1`). *For Advanced Users: Alternately, you can make this form a Radio Button field with different Campaign IDs values for different options.* 2. "Member Status" - Your campaign has different statuses for campaign members, such as "Sent" and "Responded". You can either create a hidden field with a pre-determined value, or a Radio Button field with different status options. The values should match up with your Salesforce Campaign Status options. * Save the form * Go to Form Settings > Salesforce: Web-to-Lead * Create a Feed or edit an existing Feed (see "Web-to-Lead: How do I create a Feed?" above for more information) * Find the "Campaign ID" row and select the Campaign ID field you just created * Find the "Member Status" row and select the Status field you just created * Save/Update the Feed. * There you go! = Web-to-Lead: My input values are being cut off in Salesforce = If you are submitting to a "Multi PickList" field in Salesforce, the values need to be separated with ';' instead of ','. Add a filter to your `functions.php` file: ` add_filter('gf_salesforce_implode_glue', 'change_salesforce_implode_glue'); /** * Change the way the data is submitted to salesforce to force submission as multi picklist values. * @param string $glue ',' or ';' * @param array $field The field to modify the glue for * @return string ',' or ';' */ function change_salesforce_implode_glue($glue, $field) { // Change this to the Salesforce API Name of the field that's not being passed properly. $name_of_sf_field = 'ExampleMultiSelectPicklist__c'; // If the field being checked is the Salesforce field that is being truncated, return ';' if($field['inputName'] === $name_of_sf_field || $field['adminLabel'] === $name_of_sf_field) { return ';'; } // Otherwise, return default. return $glue; } ` = How do I modify the Soap, Proxy, WSDL and connection settings? = * `gf_salesforce_wsdl` - Path to the WSDL (string) * `gf_salesforce_proxy` - Proxy settings as an object with properties host, port (integer, not a string), login and password (object, ideally a `ProxySettings` object) * `gf_salesforce_soap_options` Additional options to send to the SoapClient constructor. (array) See http://php.net/manual/en/soapclient.soapclient.php * `gf_salesforce_connection` - Modify the `SforcePartnerClient` object before it's returned. See the FAQ item above for an example of using a filter. = Do I need both plugins activated? = No, you only need one, and the __API plugin is recommended__: the Web-to-Lead plugin is no longer being actively developed. __If you are using Web-to-Lead, you don't need the API plugin activated. If you are using the API plugin, you don't need the Web-to-Lead activated.__ = What are the server requirements? = Your server must support the following: * PHP 5.x * SOAP Enabled * SSL Enabled * cURL Enabled * OpenSSL Enabled = I have Salesforce Enterprise Edition, not Partner Edition = Add the following to the bottom of your theme's `functions.php` file, before `?>`, if it exists: `add_filter('gf_salesforce_enterprise', '__return_true');` = How do I configure the API plugin? = ### How to set up integration: 1. In WordPress admin, go to Forms > Salesforce > Salesforce Settings 2. If you don't have your security token, follow this link to Reset Your Security Token 3. Come back to this settings page and enter your Security Token, Salesforce.com Username and Password. 4. Save the settings, and you should be done! = How do I set a custom Lead Source? (Web-to-Lead) = This feature support was added in version 1.1.1. `gf_salesforce_lead_source` is the filter. Add the following to your theme's `functions.php` file. Modify as you see fit: ` add_filter('gf_salesforce_lead_source', 'make_my_own_lead_source', 1, 3); function make_my_own_lead_source($lead_source, $form_meta, $data) { // $lead_source - What was about to be used (normally Gravity Forms Form Title) // $form_meta - Gravity Forms form details // $data - The data passed to Salesforce return $lead_source; // Return something else if you want to. } ` = My Assignment Rule is not triggered. How do I fix this? = ` add_action('gf_salesforce_connection', 'gf_salesforce_set_default_assignement_rule'); function gf_salesforce_set_default_assignement_rule($client) { // Two Options for Setting Assignment Rule // 1. Pass in AssignmentRule ID and "false" to use a specific assignment rule. // 2. Pass in null and true to trigger the DEFAULT AssignementRule $header = new \AssignmentRuleHeader(null, true); $client->setAssignmentRuleHeader($header); return $client; } ` = Can I use Salesforce Custom Fields? (Web-to-Lead) = You can. When you are trying to map a custom field, you need to set either the "Admin Label" for the input (in the Advanced tab of each field in the Gravity Forms form editor) or the Parameter Name (in Advanced tab, visible after checking "Allow field to be populated dynamically") to be the API Name of the Custom Field as shown in Salesforce. For example, a Custom Field with a Field Label "Web Source" could have an API Name of `SFGA__Web_Source__c`. You can find your Custom Fields under [Your Name] → Setup → Leads → Fields, then at the bottom of the page, there's a list of "Lead Custom Fields & Relationships". This is where you will find the "API Name" to use in the Admin Label or Parameter Name. = What's the license for this plugin? = This plugin is released under a GPL license. = How'd you rock OAuth so hard? = That'd be thanks to the [PHPoAuthLib](https://github.com/Lusitanian/PHPoAuthLib) library. Thanks! == Changelog == = 2.6 = * Converted plugin to using OAuth = 2.5.2 = * Added "Upsert" functionality - if an object (Lead or Contact for example) already exists in Salesforce, update it rather than creating another object. Configure this setting at the bottom of existing Feeds. = 2.5 & 2.5.1 on January 7, 2014 = * Web-to-Lead: Completely re-wrote the add-on to provide full Feed capability. See the FAQ to learn how to set up the new feeds: "Web-to-Lead: How do I convert my existing form configuration to Feeds?" (Requires Gravity Forms 1.7+) * Web-to-Lead: Added integration with the Gravity Forms Logging Tool * Web-to-Lead: Added option for Salesforce debugging emails, which are very helpful! * API: Added a filter `gf_salesforce_enterprise` to use the Enterprise Client instead of the Partner client. Thanks, [@sc0ttkclark](https://github.com/sc0ttkclark) = 2.4.1 = * Added more filters: `gf_salesforce_mapped_field_name`, `gf_salesforce_mapped_value`, `gf_salesforce_mapped_value_{$field_name}`. Thanks, @sc0ttkclark! = 2.4 = * Added filters to modify connection details. See the FAQ item "How do I modify the Soap, Proxy, WSDL and connection settings?" * Updated to latest Salesforce PHP Toolkit library = 2.3 & 2.3.1 & 2.3.2 = * API * __Now fully supports custom objects!__ * Fixed error with endless spinning when choosing "Select the form to tap into" * Fixed a few PHP notices * Now supports line breaks in submitted content * Web to Lead * Fixed issue on Form Settings page caused by Gravity Forms 1.7.7 update. * Now properly handles data with `'` and `"` - no longer adds slashes = 2.2.7 = * Updated Web to Lead - Fixed Lists input type - Fixed issue where checkboxes and multiselects were being added as Array = 2.2.6 = * Updated Web to Lead to work with Gravity Forms 1.7+ form settings screens = 2.2.5 = * Fixed Web to Lead picklist functionality. Thanks, Ryan Allen! = 2.2.4.3 = * Fixed issue that should never have happened, but did: the "Gravity Forms Not Installed" message showed up for an user on the front-end of their site and prevented them from logging in. * Fixed admin PHP Notice when gravity forms is not activated = 2.2.4.2 = * Fixed one more issue with "Array" as submitted value when using select dropdown lists and Salesforce Field Mapping. *Note: after updating the plugin, you may need to re-save your affected forms.* = 2.2.4.1 = * Fixed issue introduced in 2.2.4 that prevented options from being editable when Salesforce Field Mapping was not enabled. = 2.2.4 = * Fixed issue with selecting Live Field Mapping where object information wouldn't load if there was an apostophe in the field name or description. * Improved Live Field Mapping display: disabled fields stay looking disabled on form save. * Fixed issue where Live Field Mapping would not send form data properly. This was caused by the plugin wrongly assigning "inputs" to the fields, causing the field IDs not to match upon submit. * Fixed version number on Gravity Forms Salesforce Web to Lead Add-On so that it won't always seem like there's an update waiting. = 2.2.3 = * Fixed issue where Web to Lead Form Editor would no longer load if Salesforce API plugin was enabled and not configured. As reported here and here. * Fixed issue where Salesforce Fields disappeared when mapping fields using the Salesforce API plugin, as reported here. Thanks to @gmcinnes for the fix. * Improved XML validation by escaping XML characters `< ' " & >` and also removing UTF-8 "control characters". Should solve the issue reported here in regards to "PHP Fatal error: Uncaught SoapFault exception: [soapenv:Client] An invalid XML character (Unicode: 0xb) was found in the element content of the document." = 2.2.2 = * Added Edit Form and Preview Form links to Salesforce.com Feeds list * Fixed issues with array processing with new `_remove_empty_fields` and `_convert_to_utf_8` methods = 2.2.1 = * API: Made live updating optional with radio button * API: Added cache time dropdown * API: Refreshes transients when changing cache time * Web to Lead: Fixed issue where Salesforce icon wouldn't show up on load in Edit Form screen * Web to Lead: Salesforce icon now shows properly on Edit Forms screen = 2.2 = * Added Salesforce picklist value mapping with Checkbox, Radio, Drop Down, and Multi Select fields. This feature dynamically pulls in fields from Salesforce so you don't need to re-create them. The downside? You need to modify default fields, field order in Salesforce. * Added fixes provided by gmcinnes: Make sure new error email functionality catches exceptions, Don't send empty fields to Salesforce, and Make sure to send zeros to Salesforce = 2.1.1 = * Fixed issue reported here with fatal error = 2.1 = * Fixed: Added support for multiselect fields other fields with multiple responses * Added: Entries now get assigned a Salesforce ID that link directly to the Salesforce contact or object (API plugin only) * Added: Notes are now added to Entries with the success or error messages from exporting to Salesforce (API plugin only) * Added: You can have Salesforce export errors emailed to you when they occur (API plugin only) = 2.0.2 = * Fixed issue with HTML encoding to fix SOAP fatal error. Thanks, gmcinnes! = 2.0.1 = * Renamed the plugin files so that you wouldn't need to re-activate. = 2.0 = * Added API plugin. A complete rewrite; switched to SOAP API. Will require re-configuring the plugin. * Renamed 1.x plugin "Gravity Forms Salesforce Web to Lead Add-On" = 1.1.3 = * Fixed issue with latest Gravity Forms preventing Salesforce checkbox from showing up - thanks Michael Manley! = 1.1.2 = * Fixed issue where entered Salesforce field mapping labels were being overwritten by auto-labeling. - Added filter `gf_salesforce_autolabel` to turn off auto-labeling by adding `add_filter('gf_salesforce_autolabel', '__return_false');` to your theme's functions.php file. - Made auto-labeling much less aggressive: now only matches exact matches for First Name, Company, etc. * Added support for checkboxes and other multiple-item fields using `implode()` PHP functionality: lists will be converted to comma-separated values. = 1.1.1 = * Fixes issue where all forms get submitted to Salesforce, not only enabled forms (reported on support forum). * Added a new filter to modify the lead source `gf_salesforce_lead_source`, as requested here. Passes three arguments: `$lead_source`, `$gf_form_meta`, `$salesforce_data`. = 1.1 = * Added support for Custom Fields (view the FAQ here, or the Gravity Forms Salesforce Add-on Settings page for this plugin) * Improved authentication check in the settings page - no longer creates a blank lead. * Fixed some PHP notices = 1.0 = * Launch! == Upgrade Notice == = 2.5.2 = * Added "Upsert" functionality - if an object (Lead or Contact for example) already exists in Salesforce, update it rather than creating another object. Configure this setting at the bottom of existing Feeds. = 2.5 & 2.5.1 on January 7, 2014 = * Web-to-Lead: Completely re-wrote the add-on to provide full Feed capability. See the FAQ to learn how to set up the new feeds: "Web-to-Lead: How do I convert my existing form configuration to Feeds?" (Requires Gravity Forms 1.7+) * Web-to-Lead: Added integration with the Gravity Forms Logging Tool * Web-to-Lead: Added option for Salesforce debugging emails, which are very helpful! * API: Added a filter `gf_salesforce_enterprise` to use the Enterprise Client instead of the Partner client. Thanks, [@sc0ttkclark](https://github.com/sc0ttkclark) = 2.4.1 = * Added more filters: `gf_salesforce_mapped_field_name`, `gf_salesforce_mapped_value`, `gf_salesforce_mapped_value_{$field_name}`. Thanks, @sc0ttkclark! = 2.4 = * Added filters to modify connection details. See the FAQ item "How do I modify the Soap, Proxy, WSDL and connection settings?" * Updated to latest Salesforce PHP Toolkit library = 2.3 & 2.3.1 & 2.3.2 = * API * __Now fully supports custom objects!__ * Fixed error with endless spinning when choosing "Select the form to tap into" * Fixed a few PHP notices * Now supports line breaks in submitted content * Web to Lead * Fixed issue on Form Settings page caused by Gravity Forms 1.7.7 update. * Now properly handles data with `'` and `"` - no longer adds slashes = 2.2.7 = * Updated Web to Lead - Fixed Lists input type - Fixed issue where checkboxes and multiselects were being added as Array = 2.2.6 = * Updated Web to Lead to work with Gravity Forms 1.7+ form settings screens = 2.2.5 = * Fixed Web to Lead picklist functionality. Thanks, Ryan Allen! = 2.2.4.3 = * Fixed issue that should never have happened, but did: the "Gravity Forms Not Installed" message showed up for an user on the front-end of their site and prevented them from logging in. * Fixed admin PHP Notice when gravity forms is not activated = 2.2.4.2 = * Fixed one more issue with "Array" as submitted value when using select dropdown lists and Salesforce Field Mapping. *Note: after updating the plugin, you may need to re-save your affected forms.* = 2.2.4.1 = * Fixed issue introduced in 2.2.4 that prevented options from being editable when Salesforce Field Mapping was not enabled. = 2.2.4 = * Fixed issue with selecting Live Field Mapping where object information wouldn't load if there was an apostophe in the field name or description. * Improved Live Field Mapping display: disabled fields stay looking disabled on form save. * Fixed issue where Live Field Mapping would not send form data properly. This was caused by the plugin wrongly assigning "inputs" to the fields, causing the field IDs not to match upon submit. * Fixed version number on Gravity Forms Salesforce Web to Lead Add-On so that it won't always seem like there's an update waiting. = 2.2.3 = * Fixed issue where Web to Lead Form Editor would no longer load if Salesforce API plugin was enabled and not configured. As reported here and here. * Fixed issue where Salesforce Fields disappeared when mapping fields using the Salesforce API plugin, as reported here. Thanks to @gmcinnes for the fix. * Improved XML validation by escaping XML characters `< ' " & >` and also removing UTF-8 "control characters". Should solve the issue reported here in regards to "PHP Fatal error: Uncaught SoapFault exception: [soapenv:Client] An invalid XML character (Unicode: 0xb) was found in the element content of the document." = 2.2.2 = * Added Edit Form and Preview Form links to Salesforce.com Feeds list * Fixed issues with array processing with new `_remove_empty_fields` and `_convert_to_utf_8` methods = 2.2.1 = * Made live updating optional with radio button * Added cache time dropdown * Refreshes transients when changing cache time = 2.2 = * Added Salesforce picklist value mapping with Checkbox, Radio, Drop Down, and Multi Select fields. This feature dynamically pulls in fields from Salesforce so you don't need to re-create them. The downside? You need to modify default fields, field order in Salesforce. * Added fixes provided by gmcinnes: Make sure new error email functionality catches exceptions, Don't send empty fields to Salesforce, and Make sure to send zeros to Salesforce = 2.1.1 = * Fixed issue reported here with fatal error = 2.1 = * Added: Entries now get assigned a Salesforce ID that link directly to the Salesforce contact or object (API plugin only) * Added: Notes are now added to Entries with the success or error messages from exporting to Salesforce (API plugin only) * Added: You can have Salesforce export errors emailed to you when they occur (API plugin only) = 2.0.2 = * Fixed issue with HTML encoding to fix SOAP fatal error. Thanks, gmcinnes! = 2.0 = * Complete rewrite; switched to SOAP API. Will require re-configuring the plugin. = 1.1.3 = * Fixed issue with latest Gravity Forms preventing Salesforce checkbox from showing up - thanks Michael Manley! = 1.1.2 = * Fixed issue where entered Salesforce field mapping labels were being overwritten by auto-labeling. - Added filter `gf_salesforce_autolabel` to turn off auto-labeling by adding `add_filter('gf_salesforce_autolabel', '__return_false');` to your theme's functions.php file. - Made auto-labeling much less aggressive: now only matches exact matches for First Name, Company, etc. * Added support for checkboxes and other multiple-item fields using `implode()` PHP functionality: lists will be converted to comma-separated values. = 1.1.1 = * Fixes issue where all forms get submitted to Salesforce, not only enabled forms (reported on support forum). * Added a new filter to modify the lead source `gf_salesforce_lead_source`, as requested here. Passes three arguments: `$lead_source`, `$gf_form_meta`, `$salesforce_data`. = 1.1 = * Added support for Custom Fields (view the FAQ here, or the Gravity Forms Salesforce Add-on Settings page for this plugin) * Improved authentication check in the settings page - no longer creates a blank lead. * Fixed some PHP notices = 1.0 = * Launch!