Platform
Concepts
Audiences

Audiences

Learn how to use Audiences to power your lifecycle marketing use cases.

An Audience is a user segment that you can use to target users for workflows, guides, and broadcasts. Once you start creating audiences in Knock, you can use them to:

  • trigger workflows for lifecycle messaging (such as new user signups) and transactional messaging (such as payment method updates)
  • orchestrate branch and conditional logic within your workflows using audience membership (e.g. if a user is in a paid users audience, opt them out of the workflow)
  • target users for an in-app guide
  • send a one-time message to a specific audience with a broadcast

Audience types

#

There are two types of audiences in Knock:

  • Static audiences. Static audiences are created by manually adding users, either via a reverse ETL source such as Hightouch or Census, a CSV upload, the API, or manually in the Knock dashboard.
  • Dynamic audiences. Dynamic audiences are created through building a set of query rules on top of the user data in Knock.

Creating an audience

#

Navigate to the Audiences page under the Recipients section on the Knock dashboard’s sidebar, then click “Create Audience” in the top right corner.

When creating an audience, you must choose between a static or dynamic audience. You cannot change the type of audience after it has been created.

Using audiences across environments

#

When you create an audience, regardless of the type, it will be created in the environment where you create it. You can then use the audience in any environment by promoting it to the environment you want to use it in. Learn more about environments.

Changes to an audience, like other Knock resources, are versioned and promoted to environments.

Using audiences with workflows

#

Triggering workflows

#

Workflows can be configured to trigger for every new member added to an audience.

Create or open the workflow you’d like to trigger for your audience, then open the workflow editor. Click on the “Trigger” step, then click “Edit trigger type” in the top right corner. Click “Audience“ and then select the audience you’d like this workflow to trigger from.

Audience trigger type config in the workflow editor

Commit your workflow to development, and when you’re ready promote it to production. At this point, every time a user is added to the selected audience a workflow will be triggered with that user as a recipient.

Audience conditions

#

Audience membership can be checked in branch and step conditions. Create a condition, then select “Audience membership” as the type. When the condition is evaluated during workflow execution it will check if the recipient is a member of the selected audience.

Audience condition type config in the workflow editor

Building a dynamic audience

#

Dynamic audiences are built by creating a set of query rules on top of the user data in Knock, expressed as conditions. You can build dynamic audiences using any of the properties available on your user objects.

Knock will automatically update the dynamic audience in real-time as the user data in Knock changes, moving users in and out of the audience as their properties change. These changes are known as "membership events" and are used to trigger workflows.

When building a dynamic audience, you will see a real-time preview of the audience members that match the query rules you've created on the right side of the screen. Remember, these are users in the current environment that match the query rules you've created.

All changes to the dynamic audience are versioned and promoted to environments. As soon as your changes are commited or promoted, the dynamic audience will be updated in the environment and user membership will be evaluated in real-time.

Populating a static audience

#

Before populating your static audience ensure that your user data has been identified in Knock and that you’ve configured and promoted any workflows you want to trigger with the Audience.

Supported reverse ETL vendors

#

Audiences can easily be synced from Hightouch Models and Census Segments by configuring Knock as a sync destination. Please reach out to support@knock.app for beta access to our rETL integrations with Hightouch and Census.

Audiences API

#

The Knock API can be used to sync audiences from any data warehouse or reverse ETL system. Create the audience in the Knock dashboard, then use the add and remove API operations to power your sync.

The API is designed for batch processing and accepts payloads of up to 1,000 members at a time. For more information see the audiences API docs.

CSV upload

#

You can upload a CSV of users to an audience. After uploading your CSV, you can map the CSV fields to the corresponding user fields in Knock. Knock will upsert the users as they are added to the audience and skip any users with malformed or missing IDs.

Note: The maximum size of a CSV upload is capped at 10MB.

Manually

#

You can manually add existing users to an audience.

Using audiences with tenants

#

When adding users to an audience you can optionally include a tenant ID to power per-user, per-tenant workflows. A user can exist in an audience with multiple distinct tenants.

An audience member with multiple distinct tenant ids

When a workflow triggers from an audience entry event, the tenant ID provided for the member will be passed along to the workflow trigger. If no tenant ID is provided in the API request, the workflow will run with no tenant data. If the same user is added with multiple distinct tenants, the workflow will trigger each time by default. To configure this behavior use trigger frequency controls.

Tenancy is also taken into account when checking audience membership. For a recipient to be considered a member of an audience during workflow execution, the tenant ID provided with the trigger data must match the user’s audience membership record. If no tenant ID was provided with the trigger, the user must have been added to the audience with no tenant ID.

Frequently asked questions

#

If you add a user to an Audience who has not yet been identified to Knock, they will be indicated as a "missing user" in the audience. If you subsequently identify a user with the missing user_id, they will be a member of the audience and no longer "missing."

However, Knock will not retroactively trigger any audience-entry triggered workflows for users that are identified after being added to the audience.

Yes, you can create a dynamic audience by querying the user data in Knock. Learn more about building a dynamic audience.

No, currently you cannot use source event data to build a dynamic audience. We will be adding this capability in the future. Please get in touch if you have a specific use case for this functionality.

No, you can currently only build dynamic audiences using user data in Knock. We will be adding support for other object data in the future, including the ability to build a list of users based on their relationship to other objects in your system (like tenants). Please get in touch if you have a specific use case for this functionality.

Dynamic audiences are updated in real-time. Any changes to the user data in Knock will be reflected in the dynamic audience immediately. That means if you have a property plan_type on the user object, and you build a dynamic audience for users on the pro plan, setting the plan_type to pro will immediately add the user to the dynamic audience.

While you can use an audience on a development branch to power workflows, broadcasts, and guides, you cannot make changes to an audience on a branch. You can only make changes to an audience on the main branch.