{
    "$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": [
                {
                    "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"
                        }
                    ]
                }
            ],
            "actions": [
                {
                    "key": "setWorkflowState",
                    "type": "setWorkflowState",
                    "newWorkflowStateKey": "core_review"
                },
                {
                    "key": "sendNotification_web_socket",
                    "type": "sendNotification",
                    "notificationTemplateKey": "cust_automation_notification_templates_web_socket_completed_attributes"
                }
            ]
        }
    ]
}