Migrate from Courier to Knock
Learn how to migrate your notifications from Courier to Knock.
Knock’s APIs and developer tools make it easy to migrate your notification templates and user data from other notifications platforms into Knock. In this guide, we will walk you through planning and executing a migration from Courier into Knock.
Mapping Courier concepts to Knock concepts
Before migrating any data into Knock, it’s helpful to understand how the resources in your Courier account map to concepts and resources in Knock.
Integrations
In order to deliver notifications with Courier, you installed one or more Integrations for downstream providers in your Courier dashboard. In Knock, we refer to these delivery platforms as Channels.
Channels are configured under the Integrations tab in your Knock dashboard. You can see a full list of supported Channel types and providers here.
In addition to first-party integrations with message delivery platforms, Knock also offers convenient connections to customer data platforms (CDPs) and reverse ETL providers to bring your data into Knock (Sources), as well as to popular analytics and data warehousing tools to allow you to export important data out of Knock (Extensions).
Automations and Notification Templates
In Courier, the content of your notifications is contained in templates built in your dashboard, and the orchestration and logic of sending your notifications is contained in Automations.
Knock combines both of these things into a single resource called a Workflow, which serves as a container for all of the logic and message templates associated with a given notification in your system. You can also create Partials, which are content blocks that can be used across multiple workflows.
When you’re ready to start sending notifications, you’ll do so by triggering your workflows.
Users and Profiles
Courier uses the concept of Users to represent the recipients of notifications, with optional Profile records associated with each user to hold data about that user.
Knock combines these concepts under a single User object on which you can store any number of custom properties related to your notifications’ recipients.
Lists
Courier allows you to build Lists of users that you would like to send a given notification to. In Knock, we call this concept Subscriptions.
Subscriptions are an extension of Objects and express the relationship between a Recipient (the subscriber) and an Object. When you trigger a notification to an Object recipient, Knock will fan out the workflow trigger to all recipients that are subscribers, automatically enqueuing a workflow run for each recipient subscriber on your behalf.
Tenants and Brands
If you’re currently using Tenants in Courier to scope your notifications to a particular workspace or organization (and optionally associating Brands with those Tenants), you can achieve similar functionality with Knock Tenants.
Unlike Courier, per-tenant branding attributes are stored directly on a Tenant in Knock rather than as a separate resource. Knock also does not directly associate Tenants with the recipients of a notification (no subscription logic necessary!); rather, a tenant
is applied as context to a particular workflow trigger in order to apply per-tenant branding, per-tenant preferences, and scope in-app feed messages to particular tenants.
User Preferences
Courier’s User Preferences API allows you to set notifications preferences for a given user by a Topic categorization and a Preference Section (a group of multiple Topics), as well as by delivery channel.
Knock’s Preferences model has a single high-level category
property that can be assigned on a Workflow; because a given workflow can have more than one category
, you can use this property to map both Topics and Preference Sections to your notifications in Knock.
Our powerful Preferences API allows your users to opt out of notifications based on the notification’s delivery channel_type
, the category
of the notification, the specific notification workflow
, or a combination of these properties. You can also extend these preferences to be tenant-specific or to evaluate conditionally.
Translations
Courier’s Translations API allows you to read and write translations to Courier in the form of .po
files that are referenced using the handlebars templating language within a notification template.
Knock helps you to power notifications in multiple locales and languages using Knock Translations. You can work with Translations directly in your dashboard or programmatically via API, and Knock supports both json
and .po
file formats.
When using the t
tag method of referencing translations in your message templates, Knock will automatically generate the associated translation files for each of your registered locales behind the scenes.
Migrating your data into Knock
Now that you have a good understanding of how the resources in your Courier account map to concepts and resources in Knock, you can start planning your migration.
Knock offers APIs and developer tools that make a migration smooth and efficient:
- A Management API that allows you to work programmatically with the resources that you can also create directly in your Knock dashboard (like Workflows and their associated message templates, email Layouts, and Translations).
- A command line interface (Knock CLI) that wraps the Management API, allowing you to work with your dashboard resources from the command line.
- Bulk endpoints that allow you to upsert large amounts of data in a single API request (more on specific endpoints below).
We recommend migrating data into Knock in the following order to ensure that certain resources which are dependencies of other resources are migrated first: