In this example, we will configure an automation rule that monitors documents in the Sales Strategy space. Once all required metadata fields are filled in, the document is automatically moved to the Review workflow state and a notification is sent to the Steward.
To ensure that documentation is not left waiting unnecessarily and stewards can focus on final validation, we will configure the following rule:
| Trigger | Stream | Action |
|---|---|---|
| Object is updated | Objects in the Draft workflow state in the Sales Strategy space that have all following required metadata filled in: Summary, Description, Owner, Steward, Labels | Set object status to Review, Notify the Steward |
Download the example automation rule here: Example - All Attributes Completed.json
Download the example notification template here: Example - All Attributes Completed (Notification Template).json
Trigger
Let’s start with configuring when the rule should run. The automation will be triggered whenever key attributes or relations are added or updated, which are the following for our example:
- Changed attributes: AI-generated summary and description
- Added user relations: Owner and steward
- Added object relations: Security classification level, area label, and documentation type
{
"$schema": "https://schema.dawiso.com/automation-schema.json",
"automations": [
{
"key": "cust_completed_attributes",
"name": "Completed Attributes",
"triggers": [
{
"key": "attributeChanged",
"type": "attributeChanged",
"attributeTypeKeys": [
"core_ai_generated_summary",
"core_documentation_content"
]
},
{
"key": "userRelationAdded",
"type": "userRelationAdded",
"userRelationTypeKeys": [
"core_business_owner",
"core_steward"
]
},
{
"key": "relationAdded",
"type": "relationAdded",
"relationTypeKeys": [
"core_has_sec_classification",
"core_code_lists_has_area",
"has_doc_type"
]
}
]
}
]
}
Stream
Next, we define the criteria that the object must meet in order to move forward. This stream filters for:
- Objects in the Sales Strategy space
- Documents in the Documentation application
- Objects that are in the Draft workflow state
- All required fields and relations filled in:
- Content and summary are provided
- Business owner and steward are assigned
- Document is classified
- Business area and document type are defined
{
"$schema": "https://schema.dawiso.com/automation-schema.json",
"automations": [
{
"key": "cust_completed_attributes",
"name": "Completed Attributes",
"triggers": [...],
"stream": [
{
"key": "selectUserObjectRelation",
"type": "selectUserObjectRelation",
"userRelationTypeKeys": [ "core_steward" ]
},
{
"key": "logicalFormula",
"type": "logicalFormula",
"operator": "and",
"clauses": [
{
"type": "spaceFilter",
"operand": "in",
"values": [ "Sales Strategy" ]
},
{
"type": "applicationFilter",
"operand": "in",
"applicationKeys": [ "core_documentation_app" ]
},
{
"type": "workflowStateFilter",
"operand": "in",
"workflowStateKeys": [ "core_draft" ]
},
{
"type": "attributeFilter",
"operand": "notEmpty",
"attributeTypeKey": "core_ai_generated_summary"
},
{
"type": "attributeFilter",
"operand": "notEmpty",
"attributeTypeKey": "core_documentation_content"
},
{
"type": "userRelationFilter",
"operand": "notEmpty",
"userRelationTypeKey": "core_business_owner"
},
{
"type": "userRelationFilter",
"operand": "notEmpty",
"userRelationTypeKey": "core_steward"
},
{
"type": "relationFilter",
"operand": "notEmpty",
"relationTypeKey": "core_has_sec_classification"
},
{
"type": "relationFilter",
"operand": "notEmpty",
"relationTypeKey": "core_code_lists_has_area"
},
{
"type": "relationFilter",
"operand": "notEmpty",
"relationTypeKey": "core_has_doc_type"
}
]
}
]
}
]
}
This example uses custom space, so make sure to replace the space name (Sales Strategy) with a space available in your environment.
Actions
Finally, once all conditions are met, the object is automatically moved to the Review state and a notification is sent to its Data Steward.
{
"$schema": "https://schema.dawiso.com/automation-schema.json",
"automations": [
{
"key": "cust_completed_attributes",
"name": "Completed Attributes",
"triggers": [...],
"stream": [...],
"actions": [
{
"key": "setWorkflowState",
"type": "setWorkflowState",
"newWorkflowStateKey": "core_review"
},
{
"key": "sendNotification_web_socket",
"type": "sendNotification",
"notificationTemplateKey": "cust_automation_notification_templates_web_socket_completed_attributes"
}
]
}
]
}
This example uses custom configuration, including the notification template (cust_automation_notification_templates_web_socket_completed_attributes), which must be defined in a package. You can use our example template below.
Notification Template
The notification templates used in this example are defined in a custom package (Settings > Packages > Resources). These templates are fully customizable and can be adapted to suit the needs of your organization, for example, to reflect internal terminology, tone, or escalation rules.
Click here to show the example message.
Title: Document ‘Sales Strategy 2025’ ready for review
The document Sales Strategy 2025 has been completed and is ready for review. Please validate its content and classification.
These templates must exist in your environment for the rule to work. You can use your own templates or use our provided example.
{
"$schema": "https://schema.dawiso.com/package-schema.json",
"package": {
"key": "cust_automation_notification_templates",
"name": "Automation Notification Templates",
"autoInstall": false,
"assets": {
"notificationTemplates": [
{
"key": "web_socket_completed_attributes",
"notificationTypeKey": "automation",
"notificationChannelKey": "web_socket",
"titleTemplate": "Document '{{currentObject}.name()}' ready for review",
"descriptionTemplate": "The document {{currentObject}.link()} has been completed and is ready for review. Please validate its content and classification."
}
]
}
}
}
You can use HTML in your template to style your text, however, they only work for email notifications. In-app notifications will ignore any text formatting.