Environments
Learn how to use Knock environments.
Knock environments enable you to test and review changes before you ship them to production.
Each Knock environment has its own isolated data (such as users, tenants, and objects) and its own version-controlled content (such as workflows, guides, and layouts.)
How environments work
#Your Knock account starts with two environments: development and production.
You can create additional environments (for example, a Staging environment to mirror your own development lifecycle.)
Environments contain isolated data (such as users, objects, and logs) and version-controlled content (such as workflows, layouts, and partials.)
With Knock environments you:
- Use environment-specific API keys to send data to your environments.
- Create, update, and version content within any environment.
- For production-critical use cases, create content in your development environment, then promote it to production.
Send data to environments
#Each environment has a set of data resources that are per-environment and will never be shared between environments. These data resources are not version-controlled.
An example: the users you identify in Knock. Your real production users are identified in your production environment, while your test development users are identified in your development environment.
Each environment has its own set of API keys which you use to send data to the environment. You can find your environment-specific API keys under "Platform" > "API keys" in the Knock dashboard.
Create content in environments
#Each environment has a set of content resources that are managed via version control. These are resources associated with the creation and orchestration of the content you send to your customers, such as workflows, layouts, and templates.
Here's how content resources work:
- Content can be created in any environment.
- Content can be promoted upwards through environments.
- Content can only be edited in the environment in which it was created.
- Content is versioned with commits. You can roll back to earlier commits at any time.
These rules enable two ways of working with content and shipping it to your end users in production:
Create additional environments
#By default your Knock account comes with two environments: development and production. If you need an additional environment in Knock to mirror your own development lifecycle (for example, a staging environment) you can add it on the settings page of the Knock dashboard.
To create a new environment, go to the Environments page under the Version control section of your account settings. You'll see a button to "Create environment."
When you create an additional environment, it will be inserted between development and production for environment promotion purposes. Any additional new environments will always be added one "level" lower than Production; environments cannot be re-ordered, as this would break the promotion model for previously-promoted changes.
Environment access controls
#We recognize the importance of protecting your sensitive data, so we designed Knock from the ground-up with privacy and security in mind.
There are two tools you can use to control access to your data in the Knock dashboard:
- Roles and permissions. Knock offers granular roles for the different functions your team members may want to carry out in Knock, such as support team members that need to debug issues for customers but shouldn't be making changes to notification logic.
- Customer data obfuscation. You can use our per-environment data obfuscation controls to configure whether you want your team members to be able to view customer data in the Knock dashboard.