{
  "nodes": [
    {
      "id": "9d30bfe0-001e-4445-976e-0df5a8254ac2",
      "name": "Webhook: Receive WhatsApp message",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -176,
        480
      ],
      "webhookId": "d51e6907-51df-47b8-81d6-0858de5fde03",
      "parameters": {},
      "typeVersion": 2.1
    },
    {
      "id": "189e3ce1-fec1-4d94-be73-da703118b87e",
      "name": "AI Agent Router: Classify msg",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        144,
        480
      ],
      "parameters": {},
      "retryOnFail": true,
      "typeVersion": 2.2
    },
    {
      "id": "18dcdb01-7416-4a81-bfcb-b5d8abd9faca",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        624,
        416
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "b96229cd-3fb9-4a7c-8ec9-5e2e36b75a59",
      "name": "Branches System Prompt",
      "type": "n8n-nodes-base.set",
      "position": [
        1168,
        160
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "ef93f4fd-7e51-46fc-95a6-ab773df04579",
      "name": "Menu System Prompt",
      "type": "n8n-nodes-base.set",
      "position": [
        1168,
        320
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "623e9a7b-3778-494f-a919-781feab402af",
      "name": "Orders System Prompt",
      "type": "n8n-nodes-base.set",
      "position": [
        1168,
        480
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "11cd0c4b-4fe8-4da6-bc8e-f550dcd953c3",
      "name": "Complaints System Prompt",
      "type": "n8n-nodes-base.set",
      "position": [
        1168,
        656
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "f6a27fb1-9291-4687-9625-8c9bea2375a1",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2112,
        480
      ],
      "parameters": {},
      "typeVersion": 2.1
    },
    {
      "id": "8fb14eb4-075d-45b4-a8b8-526f9d4651b8",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        48,
        768
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "8847a24d-1266-41fa-9dd1-8e6547716958",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1600,
        816
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "662494b2-6e08-4e7c-8b8d-1caa3ef50490",
      "name": "OpenAI Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        304,
        992
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "c637dc10-ea64-4abd-83da-d9d7b67ec09a",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        320,
        784
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "d4fa3686-d1e3-497f-9d0d-bfe791673dbd",
      "name": "crm_search_tool",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        2384,
        880
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "2bba142d-e8c5-46ca-b233-51db289b6d5d",
      "name": "save_crm_record_tool",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        2272,
        1056
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "f1b6aeec-f44d-46f7-b03b-35b21035a4ae",
      "name": "get_loyalty_points_tool",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        2576,
        896
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "37799578-729f-44f4-8297-649b9bb01f01",
      "name": "items_search_tool",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        1952,
        1088
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "91a47de2-80d5-4b09-9743-4a4e654776d4",
      "name": "branches_search_tool",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        2112,
        1008
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "a71fb812-f415-4fc1-ba82-87e35a2fdf71",
      "name": "categories_search_tool",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        1856,
        928
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "8ae8e48b-169b-4108-a1dc-91846d6b67a3",
      "name": "Send WhatsApp Greeting",
      "type": "n8n-nodes-evolution-api.evolutionApi",
      "position": [
        1168,
        848
      ],
      "parameters": {},
      "notesInFlow": false,
      "retryOnFail": true,
      "typeVersion": 1
    },
    {
      "id": "464cada5-8d21-4d1a-ac0b-ef5abe8fdbff",
      "name": "Send Answer to User's WhatsApp",
      "type": "n8n-nodes-evolution-api.evolutionApi",
      "position": [
        2736,
        480
      ],
      "parameters": {},
      "typeVersion": 1
    }
  ],
  "connections": {
    "Switch": {
      "main": [
        [
          {
            "node": "Branches System Prompt",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Menu System Prompt",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Orders System Prompt",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Complaints System Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Send Answer to User's WhatsApp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent Router: Classify msg": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook: Receive WhatsApp message": {
      "main": [
        [
          {
            "node": "AI Agent Router: Classify msg",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}