Support

Home Forums Event Espresso Premium Infusionsoft EE4 Event Date

Infusionsoft EE4 Event Date

Posted: October 27, 2019 at 12:20 am


jakelunniss

October 27, 2019 at 12:20 am

Hey there,

I added the below code in the hope that a date would be passed to Infusionsoft. I’ve tried both a date field and a text field, but neither are passing any information into the custom field.

What have I missed?

Thank you!

function espresso_infusionsoft_save_date_field($attendee_data) {

$clean_attendee_data = array(

'_EventStartDateText' => $attendee_data['start_date'],

);

return array_merge($attendee_data, $clean_attendee_data);

}

add_filter( 'filter_hook_espresso_infusionsoft_extra_attendee_data', 'espresso_infusionsoft_save_date_field', 10, 1 );


jakelunniss

October 27, 2019 at 12:22 am

function espresso_infusionsoft_save_date_field($attendee_data) {

	$clean_attendee_data = array(

			
		'_EventStartDateText'   => $attendee_data['start_date'],

	);

	return array_merge($attendee_data, $clean_attendee_data);

}

add_filter( 'filter_hook_espresso_infusionsoft_extra_attendee_data', 'espresso_infusionsoft_save_date_field', 10, 1 );


Tony

  • Support Staff

October 28, 2019 at 3:19 am

Hi there,

Are you using EE3 or EE4?

The above snippet is for EE3 and will not work with EE4, so before going forward I need to know which version this is for.

Note the site linked to your license key does not resolve for me, not sure if thats expected but a heads up either way.


jakelunniss

October 29, 2019 at 12:37 am

Hey Tony!

That explains it – I’m using ee4. Is there something that achieves the same thing for ee4?

(And the site linked is out of date, so no worries there).

Many thanks,

Jake


Josh

  • Support Staff

October 29, 2019 at 7:11 am

Hi Jake,

Here’s a code example that shows one way to get the start date and pass it to Infusionsoft:

https://gist.github.com/joshfeck/3fb137494e100abc925c

Please note: It appears that the Infusionsoft API doesn’t accept an incoming custom field if it’s a date type field. I tried formatting the date exactly the same way as the date type field and it didn’t work. What you can do though is make a text field in Infusionsoft for the custom event date field and the API will accept it.


jakelunniss

November 6, 2019 at 7:34 pm

Hey Josh,

Thanks for the code sample.

When we’ve used it (and changed the custom field names to our real ones), it seems to prevent ANY custom fields being populated.

Contacts are still being created, but none of the custom fields are being populated, including custom questions going to custom fields.

Any ideas why this is happening?

Many thanks,

Jake


Tony

  • Support Staff

November 7, 2019 at 4:54 am

Hi Jake,

Are you posting on multiple accounts for this same issue?

The reason I’m asking is this thread: https://eventespresso.com/topic/passing-event-date-to-infusionsoft/

Has the author of the code shown there matching your user name, so I assume this is the same code running on the site?

If so, Josh replied in the above thread with some details on what may be happening.

The support post ‘Infusionsoft EE4 Event Date’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso