Constant Contact Feed Meta

Introduction

The Feed Meta Object for the Constant Contact Add-On is an associative array with properties determining how the add-on should process the form submission.

$feed['meta'] = array(
    'feedName' => 'Constant Contact Feed 1',
    'list' => '2970d510-d1c8-11ee-9061-fa163e638ddc',
    'custom_fields' => array(
        0 => array(
            'key' => 'b76247be-4aa4-11ef-a233-fa163eeaf818',
            'custom_key' => '',
            'value' => '4',
            'custom_value' => '',
        ),
    ),
    'feed_condition_conditional_logic_object' => array(),
    'feed_condition_conditional_logic' => '0',
    'fields_email_address' => '1',
    'fields_first_name' => '3',
    'fields_last_name' => '4',
    'fields_job_title' => '',
    'fields_company_name' => '',
    'fields_home_number' => '',
    'fields_mobile_number' => '',
    'fields_work_number' => '',
    'fields_address_line_1' => '',
    'fields_city_name' => '',
    'fields_state_name' => '',
    'fields_zip_code' => '',
    'fields_country_name' => '',
    'feed_condition' => '',
    'trial_product' => NULL,
    'trial_amount' => NULL,
);

Usage

We recommend accessing the $feed meta using the rgar() or rgars() functions, e.g.:

$conditional_logic_enabled = rgars( $feed, 'meta/feedCondition' );

if ( $conditional_logic_enabled ) {
    // Conditional logic is enabled for this feed.
    $logic_rules = rgars( $feed, 'meta/feed_condition_conditional_logic_object/conditionalLogic/rules' );
    foreach ( $logic_rules as $rule ) {
        // Process each conditional logic rule.
        $field_id  = rgar( $rule, 'fieldId' );
        $operator  = rgar( $rule, 'operator' );
        $value     = rgar( $rule, 'value' );
        // Example: Use $field_id, $operator, and $value in your logic.
    }
}

Properties

PropertyTypeDescription
feedNamestringA unique name for the Constant Contact feed.
liststringThe ID of the list in Constant Contact to which contacts are added.
custom_fieldsarrayAn array of custom fields used to map additional data to Constant Contact fields.
feed_condition_conditional_logic_objectarrayStores the conditional logic rules for the feed.
feed_condition_conditional_logicbooleanDetermines whether conditional logic is enabled for the feed.
fields_email_addressintegerSpecifies the field ID used to map the email address.
fields_first_nameintegerSpecifies the field ID used to map the first name.
fields_last_nameintegerSpecifies the field ID used to map the last name.
fields_job_titlestringSpecifies the field ID used to map the job title.
fields_company_namestringSpecifies the field ID used to map the company name.
fields_home_numberstringSpecifies the field ID used to map the home phone number.
fields_mobile_numberstringSpecifies the field ID used to map the mobile phone number.
fields_work_numberstringSpecifies the field ID used to map the work phone number.
fields_address_line_1stringSpecifies the field ID used to map the first address line.
fields_city_namestringSpecifies the field ID used to map the city name.
fields_state_namestringSpecifies the field ID used to map the state name.
fields_zip_codestringSpecify the field ID used to map the zip code.
fields_country_namestringSpecifies the field ID used to map the country name.
feed_conditionstringSpecifies additional conditions for running the feed.
trial_productnullSpecifies the trial product. NULL if not applicable.
trial_amountnullDefines the trial amount. NULL if not applicable.

Custom Field Properties

array(
    'key'          => '',
    'custom_key'   => '',
    'value'        => '',
    'custom_value' => '',
);
SettingTypeDescription
keystringThe name of the custom field.
custom_keystringCustom key if any.
valuestringThe ID of the form field or entry meta item contains this custom field’s value. Merge tags supported.
custom_valuestringCustom value for the field.