About Publish Rule Components
The Publish Rules allow users to manage the publishing and unpublishing of content by defining specific parameters and conditions. This functionality promotes compliance, ensures content accuracy, and upholds workflow integrity. It is particularly beneficial for content managers, marketers, and enterprise teams engaged in multi-stage approval processes.
Note:
Publishing Rules involve two components: Parameters and Conditions.
Parameters
For each publish rule, the following parameters must be specified:
- Branch(es): The branch or branches to which the publish rule will apply.
- Environment: The environment in which the rule will be effective.
- Content Type: The specific content type governed by the rule.
- Action: The action to be regulated—publish, unpublish, or both.
- Language: The language to which the rule will be applicable.
Conditions
You can use one or both of the following conditions in a publish rule. Each rule must include at least one condition.
- Approver:
Use this condition to require approval before publishing or unpublishing entries. Specify the user(s) or role(s) authorized to approve these actions.
For example, if John Snow is an approver, any entry that matches the defined parameters (such as content type, environment, or action) is subject to his review. The entry cannot be published or unpublished until he explicitly approves the action.
If a role such as Content Manager is assigned as the approver, each qualifying entry is routed to all users with that role. The entry cannot be published or unpublished unless at least one of them approves it.
Note: A publishing rule with Approver(s) as the condition can function independently of workflows. Such rules can be configured even if no workflows are defined in the stack.
- Stage:
Note: To use the Stage condition in a publishing rule, there must be at least one workflow set up in the stack.
Use this condition to restrict publishing or unpublishing of an entry until it reaches a specific workflow stage. Once applied, an entry cannot be published or unpublished unless it meets the defined stage.
For example, if the condition is set on the “Complete” stage, only entries that reach this stage and match the defined parameters become eligible for publishing or unpublishing.
Once a rule is in place, any attempt by a content manager to publish or unpublish an entry in the specified environment will trigger rule evaluation.
- If an approver is defined, the entry is sent for approval.
- If a stage is specified, Contentstack checks whether the entry has reached that stage.