Transactional survey trigger via HubSpot
Alex Bitca avatar
Written by Alex Bitca
Updated over a week ago

Transactional surveys are sent when an external event is triggered. In simpler words, when something happens outside of Retently, a survey is triggered.

Retently email and in-app transactional surveys can be triggered by multiple external services.

In this article, we will cover how you can trigger a survey via HubSpot.

Set up HubSpot events for your survey campaign

(Optional) Create a “Tags” custom property

When a HubSpot event will be triggered, your contacts’ data will be pushed through the Retently webhook link. The following data will be available for Retently:

  • Contact’s name

  • Contact’s email address

  • Contact’s company name

  • (Optional) contact’s tags

These properties are required because in order to send a survey in Retently, our system has to create a new customer in your Audience (or update a customer if you already have them in your account).

While the name, email address and company name properties are default in HubSpot and will be exported automatically, there is no default tags property. Therefore, if you want to be able to further segment your audience in your Retently campaign’s audience (see the “Filter your audience” section at the beginning of this tutorial), then you will need to create a custom property and add it in your contacts’ profiles.

To create the custom property, follow these steps:

Access the Setting page and choose the Properties category from the left sidebar. Next, click the “Create property” button.

Give your new property the following values:

  • Object type: Contact

  • Group: Contact information

  • Label: Tags

On the next step, in the “Field type” selector, choose the “Single-line text” option. Finally, click the Create button.

Any values you will add to this property in your contacts’ profiles, will be imported as customer tags in Retently.

Create a HubSpot workflow

Select workflow type

You can track specific events in HubSpot by configuring a workflow.

Follow this tutorial to learn how to configure a new workflow (this is the official HubSpot tutorial on creating workflows):

In your HubSpot account, navigate to Automation > Workflows, and in the upper right corner, click Create workflow.

In the left panel, choose whether you want to start your workflow from scratch, or from a template.

  • Start from scratch: to begin with a blank workflow, click the Start from scratch tab. Then select Contact-based, Company-based, Deal-based, Ticket-based, or Quote-based as the workflow type. If you select Contact-based, you can choose to continue from scratch or center your workflow on a date or date property.

  • Templates: to start with a default set of enrollment triggers and actions, click the Templates tab. In the left panel, search or click the Type dropdown menu to file by template type. Select a template to preview the enrollment triggers and actions on the right.

Next, click the pencil icon edit to give your workflow a name, then click Create workflow.

Set enrollment criteria

Once your workflow has been created, set the enrollment criteria. When a contact record meets these criteria, they'll automatically be enrolled. If you only want to enroll records manually, leave the enrollment trigger box blank. Learn more about manual enrollment.

In the workflow editor, click Set enrollment triggers. Learn more about setting enrollment triggers in workflows.

In the right panel, select a filter type for your enrollment trigger. Set up the criteria, then click Apply filter.

By default, records will only enroll in a workflow the first time they meet the enrollment triggers. To enable re-enrollment:

  • In the right sidebar, click the Re-enrollment tab.

  • Click to toggle the Re-enrollment switch on.

  • Select the triggers that you want to use for re-enrollment. Learn more about adding re-enrollment triggers to workflows.

Add more enrollment triggers if needed, and when you're done, click Save.

Add the webhook action

Click the plus icon + to add a workflow action. In the right panel, select Trigger a webhook and enter the webhook URL and hit the Save button.

Note: There is no need to tick the “Use Request Signature” checkbox, and you don’t need to enter an App ID.

Manage settings

Click the Settings tab to manage the workflow's settings. On the General page, select days and times that you want actions to execute, enroll contacts from Salesforce, and associate campaigns with the workflow. On the Unenrollment and suppression page, set unenrollment and suppression criteria to automatically remove or exclude records from the workflow.

Turn on your workflow

In the upper right corner, click Review. Choose to enroll records that currently meet the criteria or only enroll records that meet the criteria in the future:

  • To only enroll records that meet the enrollment triggers after the workflow is turned on, select No, only enroll [objects] which meet the trigger criteria after turning the workflow on.

  • To enroll existing records that meet the enrollment triggers, select Yes, enroll existing [objects] which meet the trigger criteria as of now.

  • If you have a Marketing Hub Starter, Professional, or Enterprise account, in contact-based workflows you can view a static list of contacts that meet the criteria by clicking Use lists to see these contacts. The list will automatically be saved and can be accessed from your lists dashboard.

Finally, review workflow settings, then click Turn on. In the dialog box, click Yes, turn on.

After you turn your workflow on, you can view the workflow history to monitor the records that are enrolled.

From now on, every time a ticket will match your automation’s conditions, the contact will be added to Retently and a transactional email survey will be sent immediately or according to your campaign’s schedule.

Note: If you want to create more transactional campaigns, you have to add the new webhook to the HubSpot workflows.

Click here to learn about other trigger services that we’re supporting.

Did this answer your question?