[ { "label": "Track Price Changes on GSheets to share with Wholesale customers ", "trigger_type": [ "product_updated" ], "object_type": "product", "app_id": "triggers", "tags": [], "settings": { "priority": 0, "condition_groups": { "1": { "conditions": [], "actions": { "2": { "type": "trigger_child_workflow", "settings": { "target_path": "product.variants", "exported_workflow": { "label": "Variant subworkflow", "trigger_type": [ "manual" ], "object_type": "product_variant", "app_id": "triggers", "tags": [], "settings": { "priority": 0, "condition_groups": { "1": { "conditions": { "1": { "field": "product_variant.database", "settings": { "multiple": "any", "key": "old_price", "operator": "empty", "value": "", "token_browser": "{{ Browse Tokens }}", "token_object_type": "product_variant", "condition_type": "AND" }, "weight": 10 } }, "actions": { "3": { "type": "step", "settings": [], "weight": 20, "target_key": null }, "1": { "type": "database_key_value", "settings": { "wait": "0", "custom_wait": "", "resource_type": "variants", "resource_id": "{{ product_variant.id }}", "key": "old_price", "value": "{{ product_variant.price }}", "token_object_type": "product_variant" }, "weight": 30, "target_key": "product_variant" }, "4": { "type": "step", "settings": [], "weight": 40, "target_key": null }, "2": { "type": "debug", "settings": { "wait": "0", "custom_wait": "", "action_label": "", "title": "", "body": "Setting Initial Value to {{ product_variant.price }}\r\nValue Saved in the database {{ product_variant.database.old_price}}", "token_object_type": "product_variant" }, "weight": 50, "target_key": "product_variant" } } }, "2": { "conditions": { "2": { "field": "product_variant.database", "settings": { "multiple": "any", "key": "old_price", "operator": "not_empty", "value": "", "token_browser": "{{ Browse Tokens }}", "token_object_type": "product_variant", "condition_type": "AND" }, "weight": 60 }, "1": { "field": "product_variant.database", "settings": { "multiple": "any", "key": "old_price", "operator": "not_equals", "value": "{{ product_variant.price }}", "token_browser": "{{ Browse Tokens }}", "token_object_type": "product_variant", "condition_type": "AND" }, "weight": 70 } }, "actions": { "1": { "type": "debug", "settings": { "wait": "0", "custom_wait": "", "action_label": "Price Change Alert", "title": "", "body": "Price For {{ product_variant.title }} changed from {{ product_variant.old_price }} to {{ product_variant.price }}", "token_object_type": "product_variant" }, "weight": 999, "target_key": "product_variant" }, "2": { "type": "database_key_value", "settings": { "wait": "0", "custom_wait": "", "resource_type": "variants", "resource_id": "{{ product_variant.id }}", "key": "old_price", "value": "{{ product_variant.price }}", "token_object_type": "product_variant" }, "weight": 1009, "target_key": "product_variant" }, "3": { "type": "google_sheets_v2", "settings": { "wait": "0", "custom_wait": "", "url": "https:\/\/docs.google.com\/spreadsheets\/d\/1q0ZQ17uP1iOquMxcat4DVNhRIpznYiG1Ze76OR-9Wsk\/edit#gid=0", "title": "Price Change", "settings": { "tab": "0", "update_mode": "", "primary_key": "" }, "cells": { "6": { "weight": "1", "value": "{{ product_variant.product.updated_at }}" }, "4": { "weight": "2", "value": "{{ product_variant.product.title }}" }, "0": { "weight": "3", "value": "{{ product_variant.title }}" }, "5": { "weight": "4", "value": "{{ product_variant.sku }}" }, "3": { "weight": "5", "value": "{{ product_variant.product.vendor }}" }, "1": { "weight": "6", "value": "{{ product_variant.database.old_price }}" }, "2": { "weight": "7", "value": "{{ product_variant.price }}" } }, "token_object_type": "product_variant" }, "weight": 1019, "target_key": "product_variant" } } } } } } }, "weight": 10, "target_key": "product" } } } }, "shared_workflow_id": 21687 } } ]