Support

Home Forums Event Espresso Premium Import Data

Import Data

Posted: March 21, 2016 at 12:03 pm


Samantha

March 21, 2016 at 12:03 pm

Hello! I wanted to put a plan together to import our data. From various posts on the forum I gleaned that I needed to downgrade to v3 (which we have done) and then I think this is what I need to do now:
1.) import events
2.) import attendees for each event

so my questions are:
1.) we are currently using wordpress users in our old event system and I have the wordpress user integration plugin for espresso. Will the import “see” this and just add what it needs to without creating duplicates for all the users? And is there anything special I need to consider?
2.) Do I have to import each list of attendees for each separate event or can I do them all at once (and if so, how) I have several years of historical data. These are all in the database already…maybe it would be easier to do some sort of direct database update to change these records rather than reimport?
3.) I am tracking attendance on our old events system, is there a way to import this?

I’m okay with direct database manipulation or custom coding for solutions to any of this if necessary. I really just need clarification on how much I can do with the import tool(s) and how do import whatever the tools can’t handle. Thank you!


Samantha

March 21, 2016 at 12:10 pm

Oops left out the last step and question 😉
3.) Upgrade to v4

Question:
4.) Will everything just convert?


Tony

  • Support Staff

March 22, 2016 at 4:23 am

Hi there,

So that I can answer your questions I need to understand this part:

I wanted to put a plan together to import our data. From various posts on the forum I gleaned that I needed to downgrade to v3 (which we have done) and then I think this is what I need to do now:

So are your using EE4 currently but want to downgraded to EE3? Or something different?

You mentioned in your second post to Upgrade to v4 so I’m not sure I follow what your trying to do. I understand you want to import your event data, but its not clear if this is from an older version of Event Espresso, another event management plugin or a completely different system?

Event Espresso does not support importing data from other system so any steps forward will take some custom development, its likely the easiest way to transfer the data will be to create a custom import script to take the details from the database and copy them into the EE3 database following EE3’s format. However this will not be a ‘simple’ task by any means.


Samantha

March 22, 2016 at 7:05 am

I think I was pretty clear, but here we go. I purchased v4 initially, but found out that all the import features were in v3. So I need to import my data to v3 and then upgrade to v4. So my first problem is getting data into v3 and my specific questions are listed above. My second problem is getting v3 upgraded to v4, which I am entirely unsure whether there is actually an upgrade path??


Samantha

March 22, 2016 at 10:38 am

The reason that I was so specific when I originally posted was because I don’t really have a lot of time for back and forth. It’s now going to take two days for an answer and I’m not even sure that after waiting it’s going to be very helpful. The reason for my post is that there are scattered answers to these questions throughout the forum and a lot of the answers are dated two and three years ago….so I’m not sure if they are still valid or not. If they are, fine, I just need clarification on that. Two of those posts involve the attendee importer, one which is linked directly from the forums and is newer, and one that is in my dashboard when I login, and that is a year older than the forum one. So naturally I was a bit confused (and still am).


Samantha

March 22, 2016 at 11:09 am

Is the event_identifier in the event import the same ID as the Event ID in the attendee import? Is that how I tie them together? What is the Registration ID in the attendee import…does this tie to the wordpress user id if we are using that plugin? In all cases, I have all this data from my export from the current software, so I just need to know how it’s tied together so I can keep my records intact. Thank you.


Samantha

March 22, 2016 at 11:35 am

If I pre-populate the venue selections and get the ID’s…can I safely add a venue column to the end of the import csv and add these where they are set to blank in the code?


Tony

  • Support Staff

March 22, 2016 at 1:06 pm

Hi there,

I’m sorry for the delay.

1.) we are currently using wordpress users in our old event system and I have the wordpress user integration plugin for espresso. Will the import “see” this and just add what it needs to without creating duplicates for all the users? And is there anything special I need to consider?

No, the import will not create any user within your install. It does NOT compare registrations to users to tie in the information. To link members to registration you’ll need to manually assigned the registration ID to the Event ID and User ID within the wp_events_member_rel table.

2.) Do I have to import each list of attendees for each separate event or can I do them all at once (and if so, how) I have several years of historical data. These are all in the database already…maybe it would be easier to do some sort of direct database update to change these records rather than reimport?

You need the Event ID to assign the registrations to, so you would need to import all of your events (or a single event) and then import the registrations for that event, assigning the ID of the event as the Event ID within the import.

3.) I am tracking attendance on our old events system, is there a way to import this?

It depends on how your tracking attendance. Within the wp_events_attendee table there is a is_checked_in column that you can use to track registrations, one each registration that you want to make as attended set that to 1.

3.) Upgrade to v4
Question:
4.) Will everything just convert?

If you format the data correct within the database then Yes there is an update path from EE3 to EE4 and EE4 will migrate all of your data over.

Your best bet would be to add EE3 on a clean install, create an Event and add a registration to that event. Then view the database tables and analyse how it is store, check the registration, install the EE3 Members Add-on and create a new registration to view how the relationship is set up.

The import tools within EE3 are designed for basic imports, they will not setup all of your registrations to user relationships, you’ll need to do this manually. They are basically just loops to add each row of the CSV into the database, there is no ‘user checking’ or relationships setup on each step.

Is the event_identifier in the event import the same ID as the Event ID in the attendee import? Is that how I tie them together? What is the Registration ID in the attendee import…does this tie to the wordpress user id if we are using that plugin? In all cases, I have all this data from my export from the current software, so I just need to know how it’s tied together so I can keep my records intact. Thank you.

No the Event Identifier is not the Event ID, the Event Identifier will be a random string built from the event name and some random characters, for example – date-event-1-56afc88810f7c

The Event ID for that same event will be the ID of the row when the event was inserted into the database. The Attendee Import uses the Event ID to assign the registrations to the event so you’ll need to add your events and then assign the registrations to the ID given to that event on import.

If I pre-populate the venue selections and get the ID’s…can I safely add a venue column to the end of the import csv and add these where they are set to blank in the code?

No you’ll need to modify the code if you want to add additional columns/venues to the import.


Samantha

March 24, 2016 at 9:28 am

Ok I understand the other things, but I’m still struggling with users. I asked you “What is the Registration ID in the attendee import…does this tie to the wordpress user id if we are using that plugin?” which you didn’t answer. This is key to figuring out a way for me to automate this conversion.


Samantha

March 24, 2016 at 9:36 am

So to be more clear, if I have the WP User Integration addon, how does that tie users to EE? And can I utilize the WP user ID to make the association when I import the attendees? Or how do I get users in the system (that are already there—as WP users).


Samantha

March 24, 2016 at 10:24 am

I should also mention that we currently have a table in our existing system that is nearly identical in structure to wp_events_member_rel

If I can get an understanding of how the users are tied to the WP users…..then I can figure out how to automate making changes to our existing table and attempting to import that to wp_events_member_rel

So mostly I need to know if there is other stuff that is normally fired that I need to also do manually….if I do this directly to the data. I hope that makes sense.


Tony

  • Support Staff

March 24, 2016 at 11:00 am

“What is the Registration ID in the attendee import

Its just a random string created based on the Event_id of the event the registration is for and the timestamp of when the registration was created using:

return uniqid($event_id . '-');

does this tie to the wordpress user id if we are using that plugin?”

No, the ID of the attendee record is stored as the attendee_id in the wp_events_member_rel table. Registration_ID is not used.

So you have this – http://take.ms/jL2IA

Event ID is the ID of the event this registration is for.

User ID is the ID of the WP users that should be linked to the attendee record (the single registration)

attendee_id is the record within wp_events_attendee that ties it all together.

So with EE3 the users add-on will query the join the attendees from wp_events_attendee with the records from wp_events_member_rel based on the current User’s ID and the attendee records.

Which means:

So to be more clear, if I have the WP User Integration addon, how does that tie users to EE?

It pulls in the attendees linked to the current users ID based on the above.

And can I utilize the WP user ID to make the association when I import the attendees? Or how do I get users in the system (that are already there—as WP users).

You will need to build out your wp_events_member_rel table based on the correct User ID’s for the correct attendee_id fields.


Samantha

March 28, 2016 at 12:55 pm

OK, I have the events in, the venues in, venues tied to events. I’m getting ready to import the registrations, but I’m still fuzzy on one thing after looking at the database and adding some records. How does the meta key wp_EE_Attendee_ID get updated….should I add all these for users who are not already in there or are these necessary for this conversion? I’m assuming that whenever someone logs in or the user record is saved, this gets created because we have about 400 or so of them in there now. My other question is, how does an admin edit the user information? I see where the address info gets added to the user profile page, but none of the custom fields do. Where would an admin edit or even view this info? Also, how would an admin add an attendee that is already a user? Thank you!!!


Samantha

March 28, 2016 at 1:14 pm

I found where they can view the info on an attendee, but what I’m looking for is a way for an admin to look up an attendee by name and view/edit their information. I did finally find where the additional questions are stored. I understand I need to import these myself (we have questions already that are tied to user meta). But…..I don’t see a path where this is even practical. In order to do it, I would need to match up a registration for a user (or all registrations?) It seems so inefficient to store more and more copies of this information for each event over and over for the same users. I was planning on matching this up and importing once for each user….not having to also look up all their registrations and set the info to each single one.


Samantha

March 28, 2016 at 1:16 pm

Please disregard my question about wp_EE_Attendee_ID..I believe that’s related to V4…..I had that installed initially and then downgraded to v3. I believe I can safely leave this alone, but please let me know if I’m wrong. Thank you.


Samantha

March 28, 2016 at 1:21 pm

PLEASE DISREGARD ALL PREVIOUS POSTS…..UGH so sorry..I wish I could edit or delete previous posts. I see that the import adds info to the wp_events_answer so…thank you for making that easy!!!!!! It still does seem a bit redundant 😉
My remaining questions: I see where the address info gets added to the user profile page, but none of the custom fields do. Where would an admin edit this info? Also, how would an admin add an attendee that is already a user? Thank you!!!


Tony

  • Support Staff

March 29, 2016 at 3:06 am

I see where the address info gets added to the user profile page, but none of the custom fields do. Where would an admin edit this info?

Within the individual registration the user made on the event – http://take.ms/uvI2V

With EE3 the data from the users profile is copied into the relevant fields and then saved within the registration using wp_events_answer, this only applies to the system questions created when EE3 is installed. Custom answers do not save within user meta by default as they are intended to be registration specific.

Also, how would an admin add an attendee that is already a user?

Event Espresso (both 3 and 4) does not allow you to select a specific user that a registration should be assigned to, however you can use a plugin such as ‘User Switching‘ to switch to that user and place the registration on the front end to assign that registration to the current user.

Event Espresso 4 will check the details used within a registration (First Name and Email Address) against the list of ‘contacts’ you currently have within EE and will assign the registration to the first contact it finds that matches the details.


Samantha

March 29, 2016 at 8:25 am

Members can also store personal information into their profile page allowing your With EE3 the data from the users profile is copied into the relevant fields and then saved within the registration using wp_events_answer, this only applies to the system questions created when EE3 is installed. Custom answers do not save within user meta by default as they are intended to be registration specific.

That’s not how the documentation reads:

members to quickly register for events by auto-filling in the personal information on the event registration form. Your users can also view past events, and pay for events.

Members can also store personal information into their profile page allowing your members to quickly register for events by auto-filling in the personal information on the event registration form. Your users can also view past events, and pay for events.

I mean, come on. This is misleading.

It is useless not to have custom fields that carry across registrations, sure there are cases where you’d want to collect data for just that event, but if I assign a question to the “PERSONAL INFORMATION” group, any fields there should be stored in User Meta and pre-populated when a logged in user signs up for an event. In our current system we show these fields to the user on registration so that they can update contact information if it has changed.

I’m not sure where to go from here.


Samantha

March 29, 2016 at 10:27 am

#2 Looking at how this is stored, what happens when a user updates their contact information through the wordpress user system (address, phone, etc.) are all the event specific contact records updated too?


Samantha

March 29, 2016 at 11:48 am

#3 And then what happens when I upgrade to v4? I don’t yet know what is different about how all this stuff is stored and works together, and I’m assuming there is no upgrade to the custom fields….or?


Samantha

March 29, 2016 at 3:25 pm

Ok…I have come to terms with this (pardon the pun :P) and I will manage the user meta through the registration and handle this outside of EE. I will modify the user integration plugin to minimize touching core stuff, and set it up so that the default values are pulled from the user meta for my custom fields as well as the contact info. I will not allow users to update this info so I will set it to admin only, then I will have to modify the core to have it set fields that are “admin only” to read only, since they are not displayed and not updated otherwise.

That will allow us to use the “login as user” plugin you suggested for the staff to register a user.

Please tell me if any of this is going to be an issue when we move to v4, as that is our goal since there are features that we need that are only available in that version.

My goal is that if I’m having to update core files I want to limit this to the user integration plugin. And of course for all this to work when I do the upgrade to V4 (of course making the same changes to customize, etc.).

I also have no idea if I’m opening up more complications. As for V4, please verify if the sync_with_wp_user function in EED_WP_Users_Admin.module.php is what I should be modifying to update my custom user meta fields? and what is sync_with_contact for..? Where would I pull from the custom meta fields to set the defaults for the registration? I’m not seeing that. This is definitely getting ahead of myself but with replies every 24 hours I can’t keep the system offline forever while I do all this.


Josh

  • Support Staff

March 29, 2016 at 4:44 pm

We do not recommend modifying the sync_with_wp_user method. If you must, you can unhook it from the callback and instead load your own function. This way, you’re not modifying the plugin code directly.

sync_with_contact() has some phpdoc styled comments above it that explains what’s going on. You’ll note that in EE4 there’s an attendee custom post type which is also referred to as an EE_Contact. sync_with_contact() syncs information between the contact record and the user account profile.


Samantha

March 29, 2016 at 5:09 pm

#4 @ Josh: am I going to have to do the same thing in V4 that I would have to do in v3 (update the custom info???) and keep it synchronized on my own? Or does it work any differently (besides being stored as a custom post type instead of in a table). I don’t have time for anything fancy at this point, I’ll edit the code and do the fancy stuff later. I was told in pre-sales that all my custom fields would be sychronzed! automatically! so I’m dealing with a half converted system right now that I’m afraid to move forward on anymore until I understand the implications of the upgrade. I need for the users to be able to run the out of the box tools to export data…..so the data needs to be in the right place for that to happen. If that means I have to repeat it in the custom post type for every registration well….fine….but I need to be able to make that happen and I’m just trying to figure out the best way.

what about #1 #2 and #3 above?


Josh

  • Support Staff

March 29, 2016 at 5:23 pm

I’m sorry you we’re given the wrong information by pre-sales. Event Espresso does not sync all custom fields. That said, you can pull in the last answer from a custom field and make it auto populate onto an EE4 registration form when using the EE4 WP User integration add-on. Please see this code example from our library:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/checkout/mn_wp_user_addon_save_custom_answers_too.php

#2 Looking at how this is stored, what happens when a user updates their contact information through the wordpress user system (address, phone, etc.) are all the event specific contact records updated too?

No.

#3 And then what happens when I upgrade to v4? I don’t yet know what is different about how all this stuff is stored and works together, and I’m assuming there is no upgrade to the custom fields….or?

The answers to custom questions from an EE3 registration form will be migrated to EE4’s registration records when you do the migration. Any custom data you add into other tables will not be migrated.


Samantha

March 30, 2016 at 2:34 pm

HI!
Ok….I requested a demo of v4 so that I could test some things out (and try to remember how it all works because I’ve been using v3 and forgot!).

So first of all, thank you for the link to the script, that will work perfectly for that part of what I needed 🙂 THANK YOU!!!

Looking at v4, I have all that I need. I was only trying to bring in user meta because I needed to give admins access to a place to edit it. But the contact feature in v4 handles that, *IF* I can get my fields into that area. So my questions are:

1) Do you have a handy dandy script already where someone has done this? (had some/all of the registration custom questions update-able in the contacts area–it would seem to make logical sense to attach it to a group–but I guess that depends how it works)

2) (And I apologize–if the demo had the WP user integration enabled, I would just test this myself and not ask about it) Does updating the info in the contact area in v4 with WP user integration installed also update the WP User info? I am assuming it does–core stuff–nothing custom I realize. And conversely, if someone updates their WP user info does it also update the contact stuff? Again, not talking about custom fields, just the default ones.

3) Is there a way to export a list of events like there was in V3? We definitely need this 🙁 I don’t see it in the area where it was in V3, I wasn’t sure if maybe I just missed it.


Samantha

March 30, 2016 at 2:43 pm

I have the answer to #2 thank you.


Josh

  • Support Staff

March 30, 2016 at 3:14 pm

Hi there,

The answer to 1&3 is no.


Samantha

March 31, 2016 at 12:02 pm

Where do we suggest features or vote on suggested features? I would like to suggest the event export…especially since it was part of v3…it is the only section that doesn’t have an export and seems a little lonely 🙁

I will do the hooks and filters where I need the other functionality. Thanks for all your help!!!


Josh

  • Support Staff

March 31, 2016 at 1:36 pm

You’re invited to vote for this feature here:

https://trello.com/c/8MWy6dxn/83-import-export-events


Samantha

March 31, 2016 at 2:24 pm

I have two versions of the importer, one is Version: 0.1-dev and one is Version: 0.1

Not sure which one I need to be using. The newer one (dev) is the one linked from the forums in a post, and the other one is the one that you download from the dashboard.


Josh

  • Support Staff

March 31, 2016 at 3:50 pm

It may help to know where you downloaded the dev version from so we can take a look at it.


Samantha

March 31, 2016 at 4:44 pm

https://eventespresso.com/topic/attendees-import/


Josh

  • Support Staff

March 31, 2016 at 5:11 pm

Either should be fine, the dev version has more bullet-proof name spacing so reduces the chances of a conflict with another plugin, and it uses native php csv functions.


Samantha

April 1, 2016 at 10:17 am

So I’m guessing I need to modify the import to actually include address data so that when I convert later the contacts are filled with the contact info??? Or do I need to put it in the answer table, or both???

The reason I keep asking about this stuff is that I have no confidence that the conversion to v4 is going to “magically” do everything at this point. So please clarify: having info present in wp_events_attendee is where the contact info is pulled for the conversion(?) or is it going to pull it from wp_events_answer (?); and then, it’s automatically going to fill the contacts area in v4, fill any data needed to run any and all of the export/reporting/data display functions in v4 AND the upgrade is going to convert the relationships in wp_events_member_rel to corresponding v4 relationships?

And should I just ignore the fact that the multiple selection answer questions all have a trailing comma, or do I need to add this to my records too for things to work right?


Josh

  • Support Staff

April 1, 2016 at 12:36 pm

There’s no need for guessing if you look at the Event Espresso 4 migration code.


Samantha

April 1, 2016 at 2:45 pm

*sigh*

In the attendee import script you are adding first name, last name, and email to both the events attendee table and the events answer tables. To start with, the import script does not add the attendee’s address *anywhere*. Yes I’m fine with adding code to accommodate adding CORE data, but adding the code to add these same records to the answer tables is quite a bit more code that I’d rather not do if it’s not necessary. If the conversion only pulls from the events attendee and then distributes it everywhere else, which is sort of what https://github.com/eventespresso/event-espresso-core/blob/master/core/data_migration_scripts/4_1_0_stages/EE_DMS_4_1_0_attendees.dmsstage.php looks like……then I shouldn’t need to put it in the answer file as well?

But you’re doing it for the other data…so that’s what led me to question it.


Josh

  • Support Staff

April 1, 2016 at 3:36 pm

Which other data are you referring to?


Samantha

April 1, 2016 at 5:05 pm

There’s no need for asking if you look at the Event Espresso 3 import code. <grin>

But to save us some time with the back and forth, you’re importing the first name, last name, and email to both the events attendee table and the events answer tables. If the conversion to v4 only pulls from the events attendee table to build out the new tables in v4, then I could save looping through the program 6 x 5000 more times (30,000!!!) to put that data into the answer table. Which appears to be unnecessary.


Josh

  • Support Staff

April 1, 2016 at 5:22 pm

It’s probably only necessary if you’re importing non-system questions, which are the ones that only get saved to the answers table.

The support post ‘Import Data’ 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