• I have a custom field added to my WooCommerce checkout called cgg_how_did_you_hear, being created with woocommerce_form_field:

    add_action( 'woocommerce_after_order_notes', 'cgg_how_did_you_hear' );
    function cgg_how_did_you_hear( $checkout ) {
    
    	echo '<div><h3>' . __('How did you hear about us?') . '</h3>';
    
    	woocommerce_form_field('cgg_how_did_you_hear', array(
    		'type'          => 'select',
    		'options'       => array(
    			'Email'     => __('Email'),
    			'Friend'    => __('Friend'),
    			'Metro Volunteers'    => __('Metro Volunteers'),
    			'Posting on University Site'    => __('Posting on University Site'),
    			'Website'    => __('Website'),
    			'Other'    => __('Other'),
    		),
    		'class'         => array(
    			'form-row-wide'
    		),
    		'default'       => 'Email',
    		'label'         => __('Fill in this field'),
    		'placeholder'   => __('Enter something'),
    	), $checkout->get_value( 'cgg_how_did_you_hear' ));
    
    	echo '</div>';
    }

    I am trying to send this data from the form to a SalesForce object using the Integration for WooCommerce and Salesforce plugin.

    In the SalesForce Feed I am choosing the SF field I want to include (“How_Learned_About_CRC__c”), and clicking ‘Add Field’. Then for the field type I am choosing “Custom Field” and in the Custom Field field, I am adding cgg_how_did_you_hear.

    Is this not the correct way to set this up? Or are there any docs / references as to how this should be set up anywhere online that I’m missing?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor sbazzi

    (@sbazzi)

    Hey @ligcreative,

    This would be the correct way to set this up. when you tested, did the data not go through. Can you check under logs and either paste the log here or open a ticket on our website if you have any sensitive info in the feed.

    Thank You – Sam

    Thread Starter LigCreative

    (@ligcreative)

    Thanks for the quick reply! I don’t see this field showing anywhere in the Data Logs.

    In the Logs, the ‘Data Sent’ block shows:

    Last Name Test Last 4
    First Name Test First 4
    Email [email protected]
    Other Street 123 North St Apt 5
    Other City Denver
    Other State/Province CO

    In the ‘More Details’ block, it shows:

    Object Contact
    TriggerOrder Submission
    Search{"Email":"[email protected]"}
    Search Response[{"attributes":{"type":"Contact","url":"\/services\/data\/v37.0\/sobjects\/Contact\/0032L00001ZaQoAQAV"},"Id":"0032L00001ZaQoAQAV"}]

    Thanks again.

    Plugin Contributor sbazzi

    (@sbazzi)

    Hey @ligcreative,

    Would be best to email us so we can investigate further.

    Can you open a ticket at crmperks.com

    Thank You – Sam

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Connect woocommerce_form_field Select Dropdown to Salesforce PickList’ is closed to new replies.