How to send lead information to HubSpot
Use the "V2 (legacy)" version of the documentation if the "V3 enabled" toggle is not enabled under "Settings -> Styling".
Connecting Qonfi to HubSpot allows you to enrich your customer data with Qonfi interaction data. Enabling HubSpot in Qonfi is easy.
Creating custom events
1. Go to your HubSpot dashboard.
2. Navigate to "Data Management" → "Event Management".
3. In here you can click "Create an event" to create the Qonfi events and start sending lead information.
Creating the event in HubSpot
1. Once you've clicked on "Create an event".
2. Select the "Code Javascript" option.
3.Now you can choose an event name. Qonfi sends 3 types of events and they are:
- qonfi_advised: Fires when a user has seen the advice.
- qonfi_advice_email_sent: Fires when a user has emailed the advice to themselves.
- qonfi_answered_question: Fires when a user answers a question.
Note: If you want to receive leads from Qonfi, you must name the events exactly as shown above.
Setting up the properties to recieve answers
In the second step of creating an event. you can choose to add custom properties.
If you want to receive question and answer data from users you should create 2 properties.
1. Select "Custom string property"
2. Make sure that the internal name is called: question. This is automatically generated by HubSpot.
3. Do the same again but now make sure that the internal name is called: answer.
Getting your HubSpot internal code
In the last step HubSpot shows you a block of code.
Here you can see the properties that get sent to the event and the name of your event.
in front of your event name is a code that looks like the image shown below:
That is the code that you use to connect Qonfi to HubSpot.
It can also be found when you select your event and look at the internal name.
Example given below:
Activating HubSpot
1. Go to ‘Account’ in the top navigation.
2. Enable Hubspot.
3. In the HubSpot section, Enter the code that comes before your event name (before the "_").
4. Now click Update and HubSpot is enabled in Qonfi
Creating contact properties and setting up the workflow.
Now we're going to create contact properties for the given answers in the custom events.
1. Select the settings icon on the top of the page (gear icon).
2. Within the settings navigate to the "Data Management" tab and select "Properties". This is where all the available contact properties are.
3. Select the orange "Create property" button and choose "create manually".
For this example i made a "User Car Brand" property because in my flow a user has to select their make and model.
Then go to "Field Type" and select "Single-line text" in this case Single-line text works because the answer is a text with a car brand.
Adding the properties to the contact info.
Now that we've made new contact properties we can add them to de contact page.
As you can see below we've already added our properties to the key information, but they're empty.
1. Navigate to "CRM" → "Contacts".
2. Select any contact from the list.
3. Now select "Actions" at Key information and select "Customize properties".
4. In the screen that pops up select "Add properties"
5. Search for you newly made property and select it to add it to the information list.
Connecting properties to contacts.
To connect given answers to contact properties you can set up a workflow within HubSpot.
1. In HubSpot go to: "Automation" → "Workflows".
2. At the top right select "Create workflow" → "From Scratch". You'll be prompted to the workflow page.
Creating a workflow for the answered questions.
For this example we're going to create a workflow that uses the "qonfi_answered_question" event. So that we can send the value of the given answers to a property in a users' contact info.
1. In the triggers search bar search for your custom event and select it so that it triggers everytime the event gets fired.
2. The second option is optional and allows the workflow to run only when a contact meets specific conditions..
3. The re-enroll switch ensures that any existing responses are updated if a user triggers the event for a second time or multiple times.
4. Now we want to add a branch so you can filter on what property you want to add to the contact information.
5. Then you want to select "One property or action output"
6. Then you want to the custom Qonfi event, in this case "qonfi_answered_question" and then you want to find and select the "answer" property.
6. And now you want to add branches based on the desired logic. In this case we have 2 questions in Qonfi for car brand and car model. We want to add those answers to our users' contact data. So each branch should be named the same as our question category within Qonfi.
7. Now we want to add the given answer to the user information. To do that we have to add a new action and select "CRM → Edit record".
8. And finally we want to choose which record to replace. In our case the property in our contact information is called "Contact Car Brand" and we want to replace its value with the given answer from the "Car Brand" question. And for the given value we want to select "qonfi_answered_question" and choose "answer".
So what we have achieved now is that when a user chooses a answer in our flow it automatically updates his or hers contact information in HubSpot.
Sending advised products in an email using HubSpot
Setting up the workflow
To get advised products from the "qonfi_advice_mail_sent" event and send them in an email in HubSpot, you can do the following:
Add a new contact property for example "qonfi_advised_products"
After you have made the contact property you should create a new workflow with the "qonfi_advice_mail_sent" event as the trigger.
Next, add an “Edit record” action to the workflow. Select the property you created earlier (in this case, "qonfi_advised_products") as the property to edit, and replace its value with the products from the "qonfi_advice_mail_sent" event.
You will see that the contact property now get's filled with the ID's of the advised products.
Next, prepare your email to display the products and add it to the workflow after the “Edit Record” step.
Preparing the products for mailing
To send the products in the email, you need to add your feed to HubSpot. To do this, go to Data Management → Data Integration, then at “Import a file” and click “Import data”.
You will be redirected to another screen. Click on “Products”, then on the next page import your feed.
On the next page, you will be taken to a mapping screen where you map your feed products to HubSpot properties. It is important to map the ID or SKU. Not all properties need to be mapped, only the ones that are used in the email. If not all properties are mapped you have to check the "Don't import data in unmapped columns" checkbox to continue.
Creating a custom module
In order to display the products in the email, you will need to create a custom module to render the products.
To do this, go to Content → Design Manager, click the “Create a new file” button, and select “Module”.
On the next screen, select the “Emails” checkbox and give your module a name.
On the left side, click on the module you just created, and on the right side enable the switch for “Use module for programmable email”.
Below that, you will find the “Fields” tab. Click “Add field” and select “CRM object”. In the “HubL variable name” field, enter the name you want to use as the variable for the products in the editor; in this example, it is “advised_products”.
Under “advised_products”, go to “Content options”. Choose “Contact” as the CRM object type and select the previously created property (“qonfi_advised_products”) under “Properties to fetch”.
Once everything is set up, you can use the editor to create your product block using custom HTML. Below is an example of how it is currently structured; however, this depends entirely on which names and data are mapped and what you want to display. This is purely an example of how it can look.
After creating your custom module, navigate to the email you want to use for the results. Click “Edit email”, then go to Add → Modules. You will find the custom module you just created, which displays the products. Drag it to the desired position in the email.
Documentation