We are hosting a video premiere where our goal is to get as many viewers as possible while gathering e-mails for future followup. So we're looking for a very streamlined signup process that will allow us to gather firstname, lastname, e-mail, and (optionally) zip, and then send them the link to the premiere page. We would obviously like to capture these signups for future communication in Tessitura.
I've set up a wordfly pages form that can gather the info, and presumably this will work for getting the info into a table in Tessitura. But I would like to develop a process for matching it up to constituents, adding a relevant activity flag for those who already exist, and, more importantly, creating a new skeleton constituent record for those who don't.
I have never programmatically created a constituent record before, and don't quite know where to start. I can see that there is code in AP_CONSTITUENT_IMPORT I could probably crib from, but is massively complex compared to the four data fields I basically have to start from.
I'm wondering if there exists somewhere an example of the minimal SQL needed to create a very basic constituent record.
You can just use the constituent import utility for that.
(If you want very much to get code-y about it, you could script an insert from the table holding your wordfly data to the C_PRIMARY_CUSTOMER conversion table and then call the conversion procedure, learn more about that from the Advanced Data Import session powerpoint from TLCC 2019. https://www.tessituranetwork.com/Community-and-Events/Conference-Archive/tlcc2019archive )
You can get a little less hacky than this, actually. Instead of leveraging the conversion tables and procedure, just load your constituent import data into TW_CONSTITUENT_IMPORT and then call AP_CONSTITUENT_IMPORT directly. You will need to generate an import session ID using AP_GET_NEXTID_function @type = 'CI', but AP_CONSTITUENT_IMPORT is absolutely designed with this pattern in mind.