Workflows
MonetizationOS allows you to build workflows that automate custom business logic. This could include automatically assigning users to plans based on their profile or referral source, or applying custom access rules.
There are several types of workflows:
- Dynamic Provisioning Workflows: Allow you to assign the right plan based on who the user is, where they came from, or how they're interacting with your app.
- Feature Workflows: Allow you to control feature property overrides at decision time.
- Surface & Component Workflows: Allow you to create custom rules to control surface and component behavior, such as gating premium content, metering usage, or applying overrides.
- Action Workflows: Allow you to define custom actions that can be triggered by system or custom events.
- Endpoint Workflows: Allow you to run code when a request is made to an endpoint.
Workflows are created through the use of custom code.
You can view your existing workflows by navigating to the Workflows section in the left-hand navigation menu.
For each workflow, you will see the workflow's name & description, type, brands it is linked to, and the option to edit or delete the workflow.
Edit a Workflow
To edit a workflow, locate it in the list and click the 'Edit' icon. On the workflow page you'll see two tabs: Workflow and Manage.
Workflow
The Workflow tab gives a preview of your workflow, and the ability to enable, disable, or delete the workflow.
Selecting 'Edit Workflow' opens a code editing screen. This is where you will write the custom logic you wish to automate.
For more information, including examples, see our Workflows reference guide.
Once you've written the workflow logic, click 'Update Workflow'.
View Workflow History
The History panel allows you to review previous versions of a workflow and restore an earlier one.
To view a workflow's history, open the code editing screen and click 'History' in the top right-hand corner, next to the 'Update Workflow' button. This will open the History panel.
On the right-hand side, you will see a list of previous versions of your workflow, ordered by the time they were created. Each version shows:
- Created: The date and time the version was created
- Created By: The team member who created the version
- Brands: The brands the version is linked to
- Environments: Any environments the version is currently live in
Select a version to view it in the left-hand panel. Here you will see the date and time the version was created, along with any environments it's currently live in. Use the toggle to switch between two views:
- Code: The workflow code for the selected version
- Changes: The differences between the selected version and your current version
To restore a version, select it from the list and click 'Restore' in the top right-hand corner. This will revert your Preview environment to the selected version. Otherwise, click 'Cancel'.
Please note: Restoring a version only updates your Preview environment. If you wish to deploy the restored version, create a new version, then deploy to the relevant environment. For more information, see our Environments guide.
Disable a Workflow
To disable a workflow, navigate to the Workflows section, then locate it in your list of workflows.
Click the 'Edit' icon, then set the 'Enable Workflow' toggle to off. Remember to click 'Update'.
Delete a Workflow
To delete a workflow, navigate to the Workflows section, then locate it in your list of workflows.
Click the 'Delete' icon. You will be prompted to confirm you wish to delete the workflow. This will permanently remove the workflow from our system. Any access checks relying on the workflow may stop working. To continue, click 'Delete'. Otherwise, click 'Cancel'.
Manage
The Manage tab allows you to alter the name, description and linked brands of your workflow.
Once done, click 'Update'.
Please note: Any changes you make to a workflow will only be available in Preview. If you wish to deploy these changes, create a new version, then deploy to the relevant environment. For more information, see our Environments guide.