{
  "workflow_name": "Reward repeat buyers with a VIP upsell and thank first-timers",
  "workflow_steps": {
    "steps": [
      {
        "id": "1",
        "position": {
          "x": 0,
          "y": 0
        },
        "data": {
          "label": "New Order",
          "app": {
            "key": "woocommerce",
            "fm_app": "woocommerce"
          },
          "eventSlug": "new_order",
          "eventTitle": "New Order Created",
          "layoutDirection": "horizontal",
          "stepNumber": 1
        },
        "targetPosition": "bottom",
        "type": "trigger",
        "stepNumber": 1,
        "expanded": true,
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "application": "woocommerce",
        "stepID": "1",
        "action": "new_order",
        "nodeType": "step",
        "actionAppArgs": [],
        "captureResponse": {
          "order_id": "10432",
          "order_number": "10432",
          "billing_first_name": "Priya",
          "billing_last_name": "Nair",
          "billing_email": "priya@example.com",
          "billing_phone": "+15557654321",
          "total": "349.00",
          "currency": "USD",
          "payment_method": "Credit Card",
          "status": "processing",
          "items_count": "3"
        },
        "responses": [
          {
            "letter": "A",
            "time": "01/07/2026, 10:00:00",
            "response": {
              "order_id": "10432",
              "order_number": "10432",
              "billing_first_name": "Priya",
              "billing_last_name": "Nair",
              "billing_email": "priya@example.com",
              "billing_phone": "+15557654321",
              "total": "349.00",
              "currency": "USD",
              "payment_method": "Credit Card",
              "status": "processing",
              "items_count": "3"
            }
          }
        ],
        "activeResponseIndex": 0
      },
      {
        "id": "2",
        "position": {
          "x": 175,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Branch by FlowMattic",
          "app": {
            "key": "branch",
            "fm_app": "branch"
          },
          "eventSlug": "evaluate_condition",
          "eventTitle": "Branch",
          "customLabel": "Repeat customer (3+ orders)?",
          "layoutDirection": "horizontal",
          "stepNumber": 2
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "filterConditions": {
            "1": [
              {
                "id": "c1",
                "key": "{woocommerce1.items_count}",
                "condition": "greater_than",
                "value": "2"
              }
            ]
          }
        },
        "filterConditions": {
          "1": [
            {
              "id": "c1",
              "key": "{woocommerce1.items_count}",
              "condition": "greater_than",
              "value": "2"
            }
          ]
        },
        "application": "branch",
        "stepID": "2",
        "action": "evaluate_condition",
        "nodeType": "branch"
      },
      {
        "id": "2-branchRoute_yes",
        "position": {
          "x": 395,
          "y": -160
        },
        "type": "action",
        "data": {
          "label": "Yes",
          "branchType": "yes",
          "layoutDirection": "horizontal",
          "stepNumber": null,
          "app": []
        },
        "branchRoute": true,
        "branchType": "yes",
        "stepID": "2-branchRoute_yes",
        "nodeType": "branchRoute",
        "actionAppArgs": []
      },
      {
        "id": "3",
        "position": {
          "x": 595,
          "y": -160
        },
        "type": "action",
        "data": {
          "label": "Send Email",
          "layoutDirection": "horizontal",
          "stepNumber": 3,
          "app": {
            "key": "email",
            "fm_app": "email"
          },
          "eventSlug": "send_email",
          "eventTitle": "Send Email"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "to_email": "{woocommerce1.billing_email}",
          "email_subject": "A VIP offer just for you",
          "email_body": "Hi {woocommerce1.billing_first_name}, as a valued repeat customer here's an exclusive upgrade offer."
        },
        "application": "email",
        "action": "send_email",
        "nodeType": "step",
        "stepID": "3"
      },
      {
        "id": "4",
        "position": {
          "x": 770,
          "y": -160
        },
        "type": "action",
        "data": {
          "label": "Tag as VIP",
          "layoutDirection": "horizontal",
          "stepNumber": 4,
          "app": {
            "key": "fluentcrm",
            "fm_app": "fluentcrm"
          },
          "eventSlug": "add_contact_to_tags",
          "eventTitle": "Add Tags to Contact"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "contact_email": "{woocommerce1.billing_email}",
          "tags": "vip"
        },
        "application": "fluentcrm",
        "action": "add_contact_to_tags",
        "nodeType": "step",
        "stepID": "4"
      },
      {
        "id": "2_yes_placeholder",
        "position": {
          "x": 945,
          "y": -160
        },
        "type": "placeholder",
        "data": {
          "label": "+",
          "layoutDirection": "horizontal",
          "stepNumber": null,
          "app": []
        },
        "measured": {
          "width": 40,
          "height": 82
        },
        "stepID": "2_yes_placeholder",
        "nodeType": "placeholder",
        "actionAppArgs": []
      },
      {
        "id": "2-branchRoute_no",
        "position": {
          "x": 395,
          "y": 160
        },
        "type": "action",
        "data": {
          "label": "No",
          "branchType": "no",
          "layoutDirection": "horizontal",
          "stepNumber": null,
          "app": []
        },
        "branchRoute": true,
        "branchType": "no",
        "stepID": "2-branchRoute_no",
        "nodeType": "branchRoute",
        "actionAppArgs": []
      },
      {
        "id": "5",
        "position": {
          "x": 595,
          "y": 160
        },
        "type": "action",
        "data": {
          "label": "Send Email",
          "layoutDirection": "horizontal",
          "stepNumber": 5,
          "app": {
            "key": "email",
            "fm_app": "email"
          },
          "eventSlug": "send_email",
          "eventTitle": "Send Email"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "to_email": "{woocommerce1.billing_email}",
          "email_subject": "Welcome to the family",
          "email_body": "Hi {woocommerce1.billing_first_name}, thanks for your first order with us!"
        },
        "application": "email",
        "action": "send_email",
        "nodeType": "step",
        "stepID": "5"
      },
      {
        "id": "6",
        "position": {
          "x": 770,
          "y": 160
        },
        "type": "action",
        "data": {
          "label": "Log first purchase",
          "layoutDirection": "horizontal",
          "stepNumber": 6,
          "app": {
            "key": "fluentcrm",
            "fm_app": "fluentcrm"
          },
          "eventSlug": "add_note_to_contact",
          "eventTitle": "Add Note to Contact"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "contact_email": "{woocommerce1.billing_email}",
          "note_title": "First-time buyer",
          "note_content": "Sent welcome message on order {woocommerce1.order_number}."
        },
        "application": "fluentcrm",
        "action": "add_note_to_contact",
        "nodeType": "step",
        "stepID": "6"
      },
      {
        "id": "2_no_placeholder",
        "position": {
          "x": 945,
          "y": 160
        },
        "type": "placeholder",
        "data": {
          "label": "+",
          "layoutDirection": "horizontal",
          "stepNumber": null,
          "app": []
        },
        "measured": {
          "width": 40,
          "height": 82
        },
        "stepID": "2_no_placeholder",
        "nodeType": "placeholder",
        "actionAppArgs": []
      }
    ],
    "edges": [
      {
        "id": "e-1-2",
        "source": "1",
        "target": "2",
        "type": "step",
        "data": []
      },
      {
        "id": "e-2-2-branchRoute_yes",
        "source": "2",
        "target": "2-branchRoute_yes",
        "type": "branch",
        "data": []
      },
      {
        "id": "e-2-branchRoute_yes-3",
        "source": "2-branchRoute_yes",
        "target": "3",
        "type": "step",
        "data": []
      },
      {
        "id": "e-3-4",
        "source": "3",
        "target": "4",
        "type": "step",
        "data": []
      },
      {
        "id": "e-4-2_yes_placeholder",
        "source": "4",
        "target": "2_yes_placeholder",
        "type": "placeholder",
        "data": []
      },
      {
        "id": "e-2-2-branchRoute_no",
        "source": "2",
        "target": "2-branchRoute_no",
        "type": "branch",
        "data": []
      },
      {
        "id": "e-2-branchRoute_no-5",
        "source": "2-branchRoute_no",
        "target": "5",
        "type": "step",
        "data": []
      },
      {
        "id": "e-5-6",
        "source": "5",
        "target": "6",
        "type": "step",
        "data": []
      },
      {
        "id": "e-6-2_no_placeholder",
        "source": "6",
        "target": "2_no_placeholder",
        "type": "placeholder",
        "data": []
      }
    ]
  },
  "workflow_settings": {
    "name": "Reward repeat buyers with a VIP upsell and thank first-timers",
    "folder": "all",
    "description": "On each new order, a Branch checks the customer's lifetime order count: loyal repeat buyers get a VIP upsell offer and tag, while new customers receive a friendly welcome.",
    "status": "off",
    "user_email": "",
    "webhook_queue": "disabled",
    "workflow_auth_key": "",
    "builder_version": "v2",
    "time": "",
    "ai_generated": "yes"
  }
}