Apps

Last updated:

How to send lead information to HubSpot

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.

Documentation HubSpot EventManagement

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.

Documentation HubSpot EventName

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.

Documentation Hubspot PropertyInternalDocumentation Hubspot Properties

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:

Documentation HubSpot Code

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:

Documentation HubSpot InternalName

Activating HubSpot

1. Click on the 'Dashboard' icon in the left navigation bar.

2. Click on 'Account' --> 'Connections' at the bottom left of the navigation bar.

3. In the HubSpot section, click on 'Enable' and enter the code that comes before your event name (before the "_").

4. Now click Update.

Documentation HubSpot Connector

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".

Documentation HubSpot UserCarDocumentation HubSpot PropertyType

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".

Documentation HubSpot ContactActions

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.

Documentation HubSPot ContactPropertyManage

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.

Documentation HubSpot WorkflowStart

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.

Documentation HubSpot BranchSelect

5. Then you want to select "One property or action output"

Documentation Hubspot BranchAction

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.

Documentation HubSpot BranchProperty

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.

Documentation HubSpot BranchCategoryDocumentation HubSpot QuestionCategory

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".

Documentation HubSpot SelectRecord

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".

Documentation HubSpot RecordEditing

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.

Documentation HubSpot UpdatedInfo

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"

Documenation HubspotAdvice Property

After you have made the contact property you should create a new workflow with the "qonfi_advice_mail_sent" event as the trigger.

Documentation HubspotAdvice 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.

Documentation HubspotAdvice Record

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.

Documentation HubspotAdvice MailFlow

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”.

Documentation HubspotAdvice Import

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.

Documentation HubspotAdvice Mapp

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.

Documentation HubSpotAdvice CreateModule

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”.

Documentation HubSpotAdvice ModuleField

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”.

Documentation HubSpotAdvice PropertyFetch

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.

Documentation HubSpotAdvice CodeExample

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 HubSpotAdvice CustomModule

Sending advised products without importing a feed in Hubspot

This explains how to send advised products to HubSpot using the qonfi_advised event, without importing a product feed. Instead of using a feed import, you manually create HubSpot contact properties for each product slot and populate them via the event payload.

Creating the properties

When Qonfi fires the qonfi_advised event, it sends product data as individual properties. Each product is represented by a numbered set of properties (e.g., product_1_*, product_2_*, etc.). These properties must exist in HubSpot before the event data can be stored against a contact.

The property names sent by Qonfi match the field names used in the Qonfi feed. For example:

Qonfi Feed PropertyHubSpot Property Nameid product_1_id title product_1_title price product_1_price image_link product_1_image_link url product_1_url

This same pattern repeats for each product slot: product_2_id, product_2_title, etc.

Add product data to the contact

To add the product data to the contact, you need to use the Edit Record action in a HubSpot workflow. This action updates the contact properties with the incoming data from the qonfi_advised event. (See also 7. in "Creating a workflow for the answered questions")

  1. In your workflow, click + to add a new action.

  2. Select Edit Record.

  3. Under Record to edit, select Contact.

  4. Click Add property and select the contact property you want to update (e.g., product_1_title).

  5. Set the value to the incoming event data by selecting the corresponding property from the qonfi_advised event payload.

  6. Repeat this for every product property you want to store on the contact.

Was this article helpful?

Yes

No

Need help?

Can't find what you're looking for? Our team is happy to help.

Contact support

Live within an hour. No developers needed.

Turn doubts into confident purchases.

4.8 rating · 300+ shops already chose Qonfi
Fox
Not sure where to start?
Book a 20‑minute demo with Fox
Loading available times…