{
  "name": "Salla Order Sync Workflow",
  "nodes": [
    {
      "parameters": {
        "events": [
          "order.created",
          "order.updated"
        ]
      },
      "id": "0f1b2c3d-4e5f-6789-abcd-ef0123456789",
      "name": "Salla Trigger",
      "type": "n8n-nodes-salla.sallaTrigger",
      "typeVersion": 1,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json.event}}",
              "operation": "equal",
              "value2": "order.created"
            }
          ]
        }
      },
      "id": "1a2b3c4d-5e6f-7890-bcde-f01234567890",
      "name": "Is New Order?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        460,
        300
      ]
    },
    {
      "parameters": {
        "resource": "order",
        "operation": "get",
        "id": "={{$json.data.id}}"
      },
      "id": "2b3c4d5e-6f78-90ab-cdef-012345678901",
      "name": "Get Order Details",
      "type": "n8n-nodes-salla.salla",
      "typeVersion": 1,
      "position": [
        680,
        200
      ]
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "order-created",
        "responseMode": "responseCode",
        "responseCode": 200,
        "responseBinaryPropertyName": "",
        "options": {}
      },
      "id": "3c4d5e6f-7890-abcd-ef01-23456789012",
      "name": "Send to External System",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        900,
        200
      ]
    },
    {
      "parameters": {
        "resource": "order",
        "operation": "update",
        "id": "={{$json.data.id}}",
        "additionalFields": {
          "status": "processing"
        }
      },
      "id": "4d5e6f78-90ab-cdef-0123-456789012345",
      "name": "Update Order Status",
      "type": "n8n-nodes-salla.salla",
      "typeVersion": 1,
      "position": [
        680,
        400
      ]
    },
    {
      "parameters": {
        "functionCode": "// Process order update\nconst orderData = $input.first().json;\n\n// Log the update\nconsole.log('Order updated:', orderData.data.id);\n\n// Return the processed data\nreturn {\n  json: {\n    orderId: orderData.data.id,\n    status: orderData.data.status,\n    updatedAt: new Date().toISOString(),\n    processed: true\n  }\n};"
      },
      "id": "5e6f7890-abcd-ef01-2345-6789012345ab",
      "name": "Process Update",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        900,
        400
      ]
    }
  ],
  "connections": {
    "Salla Trigger": {
      "main": [
        [
          {
            "node": "Is New Order?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is New Order?": {
      "main": [
        [
          {
            "node": "Get Order Details",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Order Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Order Details": {
      "main": [
        [
          {
            "node": "Send to External System",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Order Status": {
      "main": [
        [
          {
            "node": "Process Update",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {},
  "versionId": "1",
  "id": "salla-order-sync",
  "meta": {
    "instanceId": "your-n8n-instance-id"
  },
  "tags": [
    {
      "createdAt": "2024-01-01T00:00:00.000Z",
      "updatedAt": "2024-01-01T00:00:00.000Z",
      "id": "salla-integration",
      "name": "Salla Integration"
    }
  ]
} 