Capsule CRM Feed Meta

Capsule CRM Feed Meta

IntroductionUsagePropertiesCustom Field Properties

Introduction
The Feed Object meta for the Capsule CRM add-on is an associative array containing the properties which determine how the add-on should process the form submission.
$feed['meta'] = array(
'feed_name' => 'Capsule CRM Feed 1',
'person_standard_fields_first_name' => '2',
'person_custom_fields' => array(),
'feed_condition_conditional_logic' => true,
'feed_condition_conditional_logic_object' => array(
'conditionalLogic' => array(),
),
);

Usage
We recommend accessing the $feed meta using the rgar() or rgars() functions, e.g.:
$conditional_logic_enabled = rgars( $feed, 'meta/feed_condition_conditional_logic' );

Properties

feed_name string
The feed name which appears on the add-ons feeds tab.

create_person boolean
Create new contact. Default is false.

create_task boolean
Create new task. Default is false.

person_standard_fields_first_name string
The ID of the form field containing the contact』s first name.

person_standard_fields_last_name string
The ID of the form field containing the contact』s last name.

person_standard_fields_email_address string
The ID of the form field containing the contact』s email.

person_custom_fields array
A multidimensional array containing the Capsule CRM custom fields. See Custom Field Properties.

person_about string
The content to be assigned to the contact』s about field. Merge tags supported.

update_person_enable boolean
Should an existing contact be updated if found? Default is false.

update_person_action string
The update action. Should the contact details be replaced or appended. Job title and company will be replaced whether replace or append is chosen. Possible values: replace or append.

create_case boolean
Assign the contact to a new case. Default is false.

create_opportunity boolean
Assign the contact to a new opportunity. Default is false.

case_name string
The case name. Merge tags supported.

case_description string
The case description. Merge tags supported.

case_status string
The case status. Possible values: OPEN or CLOSED.

case_owner string
The case owner. The users Capsule CRM username.

opportunity_name string
The opportunity name. Merge tags supported.

opportunity_description string
The opportunity description. Merge tags supported.

opportunity_milestone string
The Capsule CRM milestone ID.

opportunity_owner string
The opportunity owner. The users Capsule CRM username.

task_description string
The task description. Merge tags supported.

task_detail string
More details for the task. Merge tags supported.

task_days_until_due integer
The number of days until the task is due.

task_status string
The task status. Possible values: OPEN or COMPLETED.

task_category string
The task category. Custom task categories can be configured in the Capsule CRM account.
Default values: Call, Email, Follow-up, Meeting, Milestone, or Send.

task_owner string
The task owner. The users Capsule CRM username.

assign_task string
What the task is assigned to. Possible values: none, case, person or opportunity.

feed_condition_conditional_logic boolean
Is the feed condition (conditional logic) setting enabled. Default is false.

feed_condition_conditional_logic_object array
An associative array containing the conditional logic rules. See the Conditional Logic Object for more details.

Custom Field Properties
array(
'key' => 'title',
'value' => '3',
)

Each custom field is an associative array containing the following properties:

key string
The Capsule CRM custom field key.
The default keys are: title, organization, email_work, email_home, phone_work, phone_mobile, phone_fax, phone_home, phone_direct, address_office, address_home, address_postal, website_url, website_skype, website_twitter, website_facebook, website_linked_in, website_xing, website_feed, website_google_plus, website_flickr, website_github, and website_youtube.

value string
The ID of the form field or entry meta item containing the value for this custom field.

Capsule CRM Change Log

Capsule CRM Change Log

1.6 | 2021-05-061.5 | 2020-09-161.4 | 2020-03-311.3 | 2018-04-091.2 | 2018-01-301.1 | 2016-07-291.0 | 2015-07-28

1.6 | 2021-05-06

Added a form settings menu icon for Gravity Forms 2.5.
Updated instructions on the add-on settings page to better describe where to locate your personal access token.

1.5 | 2020-09-16

Fixed a PHP fatal error which can occur if a request to the Capsule CRM API fails.
Fixed an issue where escaped HTML could be included in the name, description, and detail properties of cases, opportunities, persons, and tasks.
Fixed an issue where some error logging statements were echoing to the screen instead of writing to the add-on log.

1.4 | 2020-03-31

Added translations for Hebrew, Hindi, Japanese, and Turkish.
Updated stylesheets to use minified versions.
Updated feed processing to log error explaining why address is not added to object.

1.3 | 2018-04-09

Added security enhancements.
Added GPL to plugin header.
Updated Plugin URI and Author URI to use https.
Updated header to be consistent with other add-ons.

1.2 | 2018-01-30

Updated API library to work with version 2.0 of Capsule CRM API.
Added gform_capsulecrm_case filter to modify the case object before it is created.
Added gform_capsulecrm_opportunity filter to modify the opportunity object before it is created.
Added gform_capsulecrm_person filter to modify the person object before it is created/updated.
Added gform_capsulecrm_task filter to modify the tasks object before it is created.
Fixed a fatal PHP error which would occur if a WP_Error is returned when making a request to the Capsule CRM API.
Fixed PHP notice.
Fixed strings for translations.

1.1 | 2016-07-29

Added feed duplication support.
Added support for delaying feed processing until payment by PayPal Standard is successfully completed.
Updated Capsule CRM API library to use WordPress API functions.
Updated feed processing to abort person creation if email is empty or invalid.
Updated available field types for mapping to the person first name, last name, and email.
Fixed php warnings related to Milestone setting if only one milestone exists.

1.0 | 2015-07-28

It's all new!

Canceling Recurring Subscriptions

Canceling Recurring Subscriptions

IntroductionStepsScreenshotsScreenshot A— Cancel Subscription buttonScreenshot B— Subscription status canceled

Introduction
When using recurring subscriptions within the Authorize.Net Add-On, the only way to cancel a subscription is from within the WordPress dashboard. In this article, we will show you how to easily cancel a recurring subscription.
Steps

Log into your WordPress admin dashboard.
Access the list of entries for your form by hovering over Forms on the left side menu and clicking on Entries. You should see a list of the entries collected by this form. If you do not see the entries you were expecting, make sure you are viewing the correct form. You can switch forms using the drop down on the top right of the page.
Click on the name of the entry to access it.
On the right side of the entry page, you should see a button labeled Cancel Subscription within the subscription details. Simply click it to cancel the recurring subscription. See screenshot A.
The subscription status should now show as Canceled. See screenshot B.

Screenshots
Screenshot A— Cancel Subscription button

Screenshot B— Subscription status canceled

Canceling Recurring Subscriptions in Stripe

Canceling Recurring Subscriptions in Stripe

IntroductionStepsScreenshotsScreenshot A— Cancel Subscription buttonScreenshot B— Subscription status canceled

Introduction
When using recurring subscriptions with the Stripe Add-On, there are two ways to cancel a subscription. One option is from within your Stripe account, and the other from within the WordPress admin.
In this article, we will show you how to easily cancel a recurring subscription from within the WordPress admin.
Note: If you』d like to learn how to cancel subscriptions from within your Stripe account, please use this tutorial provided by Stripe.
Steps

Login to your WordPress admin dashboard.
Access the list of entries for your form by hovering over Forms on the left side menu and clicking on Entries. You should see a list of the entries collected by this form. If you do not see the entries you were expecting, make sure you are viewing the correct form. You can switch forms using the drop down on the top right of the page.
Click on the name of the entry to access it.
On the right side of the entry page, you should see a button labeled Cancel Subscription within the subscription details. Simply click it to cancel the recurring subscription. See screenshot A
The subscription status should now show as Canceled. See screenshot B.

If you have a Subscription Canceled notification configured, the customer will receive an email informing them that their subscription was been cancelled.
Screenshots
Screenshot A— Cancel Subscription button

Screenshot B— Subscription status canceled

Cancel a Stripe Subscription After a Specified Number of Payments

Cancel a Stripe Subscription After a Specified Number of Payments

The Stripe API doesn』t allow you to set the total number of recurrences of a payment when creating the subscription but it is possible to cancel the subscription via the gform_post_add_subscription_payment hook which runs after a payment is recorded.
The Stripe API now supports specifying an end date for when subscriptions should automatically cancel, this can be set using the gform_stripe_subscription_params_pre_update_customer filter.
Note: If you delete the entry associated to the subscription this snippet will not work.
123456789101112131415161718192021add_action( 'gform_post_add_subscription_payment', function ( $entry ) {    gf_stripe()->log_debug( "Running..." );     if ( rgar( $entry, 'payment_status' ) == 'Active' ) {        $feed       = gf_stripe()->get_payment_feed( $entry );        $feed_name  = rgars( $feed, 'meta/feedName' );        $feed_names = array( 'feed name one', 'feed name two' ); // update this line         if ( in_array( $feed_name, $feed_names ) ) {            gf_stripe()->log_debug( 'Feed: ' . $feed_name . 'Entry: ' . $entry['id'] );             global $wpdb;            $count = $wpdb->get_var( $wpdb->prepare( "SELECT count(id) FROM {$wpdb->prefix}gf_addon_payment_transaction WHERE lead_id=%d", $entry['id'] ) );             if ( $count >= 3 ) { // Update this line to the Total number of payments including the first one.                $result = gf_stripe()->cancel( $entry, $feed );                gf_stripe()->log_debug( "gform_post_add_subscription_payment: Cancelling subscription (feed #{$feed['id']} - {$feed_name}) for entry #{$entry['id']}. Result: " . print_r( $result, 1 ) );            }        }    }} );
The code snippet would go in your theme functions.php file.
The gform_post_add_subscription_payment is an action hook which is called after the Stripe webhook notifies your site that a payment has been made for the subscription and the add-on has recorded the transaction and added a note to the entry.
Because it runs for all forms with a subscription feed we need to tell it only to run for the correct feed, we do this by specifying the feed names in the array on this line:
1$feed_names = array( 'feed name one', 'feed name two' );
You would then update the following line with the number of payments you want to allow:
1if ( $count >= 3 ) {
If the count retrieved from the database query matches the value you specify the cancel method will be called which will notify Stripe that the subscription for that customer should be canceled.
Stripe will then notify your site when that action has been completed and the status on the entry will update to canceled and a note will be added indicating the date it was canceled.

Campfire Feed Meta

Campfire Feed Meta

IntroductionUsageProperties

Introduction
The Feed Object meta for the Campfire add-on is an associative array containing the properties which determine how the add-on should process the form submission.
$feed['meta'] = array(
'feedName' => 'Campfire Feed 1',
'message' => 'Entry #{entry_id} has been added. ({entry_url})',
'feed_condition_conditional_logic' => true,
'feed_condition_conditional_logic_object' => array(
'conditionalLogic' => array(),
),
);

Usage
We recommend accessing the $feed meta using the rgar() or rgars() functions, e.g.:
$conditional_logic_enabled = rgars( $feed, 'meta/feed_condition_conditional_logic' );

Properties

feedName string
The feed name which appears on the add-ons feeds tab.

room string
The ID of the Campfire room this feed will post a message to when processed.

message string
The message that will be posted to the Campfire room. Merge tags supported.

highlight boolean
Should the message be highlighted. Default is false.

feed_condition_conditional_logic boolean
Is the feed condition (conditional logic) setting enabled. Default is false.

feed_condition_conditional_logic_object array
An associative array containing the conditional logic rules. See the Conditional Logic Object for more details.

Campfire Change Log

Campfire Change Log

1.2.2 | 2018-04-101.2.1 | 2018-01-301.2 | 2017-06-131.1 | 2016-07-291.0 | 2015-07-29

1.2.2 | 2018-04-10

Fixed issue preventing feed from being saved.
Added security enhancements.

1.2.1 | 2018-01-30

Added GPL to plugin header.
Updated Plugin URI and Author URI to use https.

1.2 | 2017-06-13

Added more debug log statements.
Added official translations.
Fixed issue with credentials on Settings page not accurately reflecting validity.
Fixed issue with can_duplicate_feed function not having the needed parameter.

1.1 | 2016-07-29

Added feed duplication support.
Added support for delaying feed processing until payment by PayPal Standard is successfully completed.
Updated Campfire API library to use WordPress API functions.

1.0 | 2015-07-29

It's all new!

Campaign Monitor Feed Meta

Campaign Monitor Feed Meta

IntroductionUsageProperties

Introduction
The Feed Object meta for the Campaign Monitor add-on is an associative array containing the properties which determine how the add-on should process the form submission.
$feed['meta'] = array(
'feedName' => 'Your Feed Name',
'listFields_email' => '2',
'listFields_fullname' => '1',
'resubscribe' => false,
'feed_condition_conditional_logic' => true,
'feed_condition_conditional_logic_object' => array(
'conditionalLogic' => array(),
),
);

Usage
We recommend accessing the $feed meta using the rgar() or rgars() functions, e.g.:
$conditional_logic_enabled = rgars( $feed, 'meta/feed_condition_conditional_logic' );

Properties

feedName string
The feed name which appears on the add-ons feeds tab.

client string
The Campaign Monitor client ID the contacts will be added to.

contactList string
The Campaign Monitor list ID the contacts will be added to.

listFields_email string
The ID of the field containing the user』s email.

listFields_fullname string
The ID of the field containing the user』s full name.

listFields_{custom_field_name} string
The ID of the field containing the value for the custom field.
There would be properties for any custom fields configured for your list, they all begin listFields_ and then end with the custom field name (no spaces), e.g. listFields_ipaddress.

resubscribe boolean
Should the subscriber be re-added to the active list if they are in an inactive state or have previously been unsubscribed? Default is false.

feed_condition_conditional_logic boolean
Is the feed condition (conditional logic) setting enabled. Default is false.

feed_condition_conditional_logic_object array
An associative array containing the conditional logic rules. See the Conditional Logic Object for more details.

Campaign Monitor Change Log

Campaign Monitor Change Log

3.9 | 2020-09-213.8 | 2020-03-103.7 | 2018-04-023.6 | 2018-01-053.5 | 2017-05-233.4 | 2015-08-073.3 | 2015-04-203.2 | 2014-11-213.1 | 2014-11-043.0 | 2014-10-272.32.22.1 | 2013-02-082.0 | 2012-06-271.9 | 2011-11-011.8.11.8 | 2011-06-231.7 | 2011-06-211.6 | 2011-04-251.5 | 2011-04-131.4 | 2010-12-151.3 | 2010-12-151.2 | 2010-12-151.1 | 2010-12-151.0 | 2010-12-150.2 | 2010-12-150.1 | 2010-12-15

3.9 | 2020-09-21

Added support for Gravity Forms 2.5.

3.8 | 2020-03-10

Added support for feed duplication.
Added translations for Hebrew, Hindi, Japanese, and Turkish.
Updated the API Key setting description.
Fixed an issue where the Campaign Monitor API could ignore values passed from Multi Select fields.

3.7 | 2018-04-02

Added security enhancements.
Added logging statement.
Added License GPL to plugin header.
Updated Plugin URI and Author URI to use https.

3.6 | 2018-01-05

Fixed the string replacement for the Contact List tooltip.

3.5 | 2017-05-23

Fixed a fatal error which could occur with PHP 7.1 when preparing the checkbox field value.
Fixed a fatal error with PHP < 5.5. Fixed strings for translations. Updated API library to work with PHP 7+. 3.4 | 2015-08-07 Added form specific version of the gform_campaignmonitor_override_blank_custom_fields filter. Added form specific version of the gform_campaignmonitor_override_subscriber filter. Added form and field specific versions of the gform_campaignmonitor_field_value filter. Updated minimum Gravity Forms version to 1.9.3. Updated 'Opt-In Condition' setting label to 'Conditional Logic'. Updated feed processing to use get_field_value() when retrieving mapped field values, enabling support for GF_Field::get_value_export with GF 1.9.12.4 and later. Updated 'API Client ID' label on plugin settings page to 'Client API Key' so it's consistent with the wording used by Campaign Monitor. Fixed an issue with the feed list page if the API key not valid. Fixed a PHP notice if no clients are configured in the Campaign Monitor account. Fixed an issue with the upgrade routine which caused it run even if a pre-framework version hadn't been installed. 3.3 | 2015-04-20 Added support for the middle name input when preparing Name field values. Updated logging statements. Fixed a low severity security vulnerability in the admin area which could be exploited by authenticated users with form administration permissions. Fixed issues with multi-select fields not sending data in the expected format Fixed issue where client list was displayed even when API Client ID was entered. 3.2 | 2014-11-21 Added gform_campaignmonitor_override_subscriber filter to allow users to modify or add subscriber parameters sent to the Campaign Monitor API. Fixed issue where email address mapping was not being required. Fixed issue during upgrade that prevented data from being transfered to new structure under certain situations. 3.1 | 2014-11-04 Fixed issue during upgrade that prevented data from being transfered to new structure under certain situations. 3.0 | 2014-10-27 Added Add-on Framework integration. Added function gf_campaignmonitor to easily get a Campaign Monitor instance. Added missing gform_campaignmonitor_override_blank_custom_fields hook. Added gform_campaignmonitor_field_value filter to allow add-ons to modify values sent to the Campaign Monitor API. Added text domain/path to header. Updated Campaign Monitor API to version 4.0.0 to fix some conflicts with other active plugins using Campaign Monitor. Updated required version of Gravity Forms to 1.8.17. Updated POT file. Fixed notices. 2.3 Fixed bug that threw a javascript error in TruncateMiddle function when text was undefined (this could happen in some instances when a label was not specified for a field). Fixed headers already sent issue by removing blank lines at the end of files. 2.2 Updated Campaign Monitor API to version 2.5.2. Updated "Resubscribe" UI to use a label so clicking the text also checks the corresponding checkbox. 2.1 | 2013-02-08 Updated AJAX URL to resolve conflict when site is running under SSL. Updated marking the entry as subscribed to only be when the optin condition is met. Fixed issue with special characters in Campaign Monitor field names causing items to not map. Removed extraneous call to non-existant function: $api->listMergeVars().
Fixed issue where serialisation function not checked if already exists.

2.0 | 2012-06-27

Added logging support.
Added support for Manage WP.
Added new conditional logic options (greater than, less than, contains starts with, ends with) and support for other conditional fields.
Fixed notices.
Fixed issue where product name was overriding full name for subscribers.
Added integration with PayPal so that subscribers can be added only when payment is received.
Fixed localization issue with some strings.
Fixed issue where RG_CURRENT_PAGE constant was not available when Gravity Forms was deactivated.

1.9 | 2011-11-01

Fixed issue with broken function_exist conditional in API.

1.8.1

Wrapped all API classes in class_exists() conditional for compatibility with other plugins using the same API.

1.8 | 2011-06-23

Updated API wrapper so that it is compatible with v.3 of the Create Send API.
Removed blank strings from POT file.

1.7 | 2011-06-21

Added ability to map checkbox fields.
Removing price from Product fields (drop down and radio field types), so that only the Product name is sent to Campaign Monitor.
Cleaned up debug Notice messages.

1.6 | 2011-04-25

Fixed issue when using condition on a field with multiple single quote in its label.

1.5 | 2011-04-13

Fixed issue when creating a feed using forms with HTML markup in field labels.
Added logic to prevent Campaign Monitor API classes from being loaded if it is already loaded by another plugin.
Third Party Modification: Check if Services_JSON class exists (line 3, apiclassesserialisation.php).
Added "Cancel" button to Edit page and updated "Save" and "Update" button verbiage.

1.4 | 2010-12-15

Upgraded to Campaign Monitor API v3.
Added API Client ID option in settings to limit the Add-On to the specified client.

1.3 | 2010-12-15

Fixed issue with name fields (when cofigured with "Simple" type) from being exported.

1.2 | 2010-12-15

Fixed automatic upgrade issue with WP 3.0.

1.1 | 2010-12-15

Fixed issue with client drop down when there was only one client configured in Campaign Monitor.

1.0 | 2010-12-15

Updated POT file.

0.2 | 2010-12-15

Adding Campaign Monitor capabilities to admin role upon plugin activation.
Fixed bug with condition when drop down item did not have the value property set.

0.1 | 2010-12-15

Initial.