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 resources (such as workflows, layouts, and partials.)
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 resources (such as workflows, layouts, and partials.)
With Knock environments you:
- Use environment-specific API keys to send data to your environments.
- Create and update content resources in development, then promote to production.
Send data to environments
#Each environment has a set of data resources that are per-environment, isolated resources and will never be shared between environments. These data resources are not version-controlled.
An example: the users you identify in Knock. Your production users are identified in your Production environment, while your 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 and promoted between environments. These are resources associated with the creation and orchestration of the content you send to your customers.
Here's how version-controlled content resources work:
- Create and update the content in your development environment
- Commit the changes to your development environment
- Promote the changes to your production environment
Learn more about commits.
Production write access
#In some cases, you may want to enable non-technical team members to manage content directly in production. Example: a marketer who wants to create content directly in production. You can enable production write access in your account to support this.
Production write access is an opt-in feature that enables you to create and update content resources in any environment, without requiring promotion from development.
Our customers enable production write access when:
- They have content that doesn't need to be deployed through their environments, such as guides for product announcements.
- That content is managed by users that would prefer to work directly in production, such as growth and marketing teams.
How it works
#To enable production write access, go to account settings, then permissions.
When you enable production write access in your account:
-
All roles with edit permissions can edit resources in any environment. Owner, admin, and member roles can create and edit content resources (like workflows and guides) directly in production.
-
The Production Member role becomes available. This role gives a user access to the production environment, and no others. It enables non-technical team members to work in production without touching any resources that are managed in development. Learn more about the Production Member role.
-
Content resources can only be edited in the environment in which they were created. This means that any content resources you want to follow your environment lifecycle (create in development, promote to production) are only editable in development. For use cases that don't need the governance of environment promotion, you can create directly in production.
Production write access keeps engineering-governed resources like transactional workflows version controlled by the development environment, while enabling marketing and product teams to work in a simpler, production-only way for lifecycle journeys and product announcements.
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. This means all changes will continue to be introduced in your Development environment and will need to be promoted through additional environments until they land in Production. Subsequent 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-based 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 three 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.
- Production Member role. When production write access is enabled, you can assign team members the Production Member role, which provides access only to the production environment.
- 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.