[ { "label": "Delete product variants after they're sold", "trigger_type": [ "order_fulfilled" ], "object_type": "order", "app_id": "triggers", "settings": { "priority": 0, "condition_groups": [ { "conditions": [ { "field": "order.delay", "settings": { "wait": "86400", "custom_wait": "", "condition_type": "AND" }, "weight": 999 } ], "actions": [ { "type": "trigger_child_workflow", "settings": { "wait": "0", "custom_wait": "", "target_path": "order.line_items.variant", "exported_workflow": { "label": "Variant subworkflow", "trigger_type": [ "product_variant_custom" ], "object_type": "product_variant", "app_id": "triggers", "settings": { "priority": 0, "condition_groups": [ { "conditions": [ { "field": "product_variant.title", "settings": { "operator": "not_equals", "value": "Default Title", "long_value": "Default Title", "condition_type": "AND" }, "weight": 999 } ], "actions": [ { "type": "any_delete_resource", "settings": { "wait": "0", "custom_wait": "", "resource_type": "variants", "resource_id": "{{ product_variant.id }}" }, "weight": 999, "target_key": "product_variant" } ] } ] } } }, "weight": 999, "target_key": "order" } ] } ], "shared_workflow_id": 1524 }, "description": "This workflow will wait one day after the order has been fulfilled before firing. After a day, the workflow deletes all product variants from any product that were sold in the order. The product itself will not be deleted." } ]