84EM built a custom plugin that handles an integration between WordPress, Zapier, and Typeform to save health goal quiz responses to WordPress user meta. The data is used for a variety of purposes: email marketing via Klaviyo, on-site WooCommerce promotions by showing products relevant to the customer’s quiz results, and business planning.
The integration was built so that an existing WordPress user’s information is saved immediately, whereas a user who does not yet exist in WordPress has their responses stored in a custom table. If they register in WordPress with the same email address at a future date, their quiz responses will be stored in their user meta at that time.
The integration provides a custom REST API endpoint in WordPress for receiving the data and a custom Zapier hook that receives quiz data from Typeform. This allows the customer to utilize the Zapier point-and-click interface to map the responses to the user meta. Zapier then sends the data to the WordPress REST API via an authenticated webhook.
Additionally, the plugin provides shortcodes so that site editors can show the user’s quiz results anywhere on the site.