N
n8n Store
Workflow Market
Transfer Adobe Commerce customers and orders to KlickTipp with conditional Tagging

Transfer Adobe Commerce customers and orders to KlickTipp with conditional Tagging

by KlickTipp0 views

説明

Categories

⚙️ Automation

Nodes Used

n8n-nodes-base.switchn8n-nodes-base.magento2n8n-nodes-base.magento2n8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-klicktipp.klicktippn8n-nodes-klicktipp.klicktipp
Price無料
Views0
最終更新11/28/2025
workflow.json
{
  "id": "mCtnv1ABd7XoeEJI",
  "meta": {
    "instanceId": "95b3ab5a70ab1c8c1906357a367f1b236ef12a1409406fd992f60255f0f95f85"
  },
  "name": "Transfer Adobe Commerce customers and orders to KlickTipp with conditional Tagging",
  "tags": [
    {
      "id": "15wrq9sti6wyqr6J",
      "name": "TEMPLATE",
      "createdAt": "2025-01-08T16:34:30.163Z",
      "updatedAt": "2025-01-08T16:34:30.163Z"
    }
  ],
  "nodes": [
    {
      "id": "e569a7a0-2ce3-442f-90b1-973d03dc6d92",
      "name": "Transfer order data to KlickTipp",
      "type": "n8n-nodes-klicktipp.klicktipp",
      "onError": "continueErrorOutput",
      "position": [
        672,
        -32
      ],
      "parameters": {
        "email": "={{ $json.customer_email }}",
        "fields": {
          "dataFields": [
            {
              "fieldId": "fieldFirstName",
              "fieldValue": "={{ $json.customer_firstname }}"
            },
            {
              "fieldId": "fieldLastName",
              "fieldValue": "={{ $json.customer_lastname }}"
            },
            {
              "fieldId": "fieldCountry",
              "fieldValue": "={{ $json.billing_address.country_id }}"
            },
            {
              "fieldId": "fieldCity",
              "fieldValue": "={{ $json.billing_address.city }}"
            },
            {
              "fieldId": "fieldStreet1",
              "fieldValue": "={{ $json.billing_address?.street?.[0] || '' }}"
            },
            {
              "fieldId": "fieldZip",
              "fieldValue": "={{ $json.billing_address.postcode }}"
            },
            {
              "fieldId": "fieldPhone",
              "fieldValue": "={{ $json.billing_address.telephone }}"
            },
            {
              "fieldId": "field223236",
              "fieldValue": "={{ $json.payment.last_trans_id }}"
            },
            {
              "fieldId": "field223239",
              "fieldValue": "={{ $json.grand_total }}"
            },
            {
              "fieldId": "field223245",
              "fieldValue": "=https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&id={{ $json.payment.last_trans_id }}"
            },
            {
              "fieldId": "field223237",
              "fieldValue": "={{ \n  ($json.items ?? [])\n    .map(i => i.name)\n    .filter(Boolean)\n    .join(', ')\n}}"
            }
          ]
        },
        "resource": "subscriber",
        "operation": "subscribe"
      },
      "credentials": {
        "klickTippApi": {
          "id": "K9JyBdCM4SZc1cXl",
          "name": "DEMO KlickTipp account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "bdd6c077-4637-4a1b-abde-5a71f5a90eda",
      "name": "Tag contact for high-value order",
      "type": "n8n-nodes-klicktipp.klicktipp",
      "position": [
        1312,
        -128
      ],
      "parameters": {
        "email": "={{ $json.email }}",
        "tagId": [
          "13548739"
        ],
        "resource": "contact-tagging"
      },
      "credentials": {
        "klickTippApi": {
          "id": "K9JyBdCM4SZc1cXl",
          "name": "DEMO KlickTipp account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "aad62cd5-8160-4573-b8c3-0ade16c952a1",
      "name": "Tag contact for clothing purchase",
      "type": "n8n-nodes-klicktipp.klicktipp",
      "position": [
        1312,
        64
      ],
      "parameters": {
        "email": "={{ $json.email }}",
        "tagId": [
          "13548800"
        ],
        "resource": "contact-tagging"
      },
      "credentials": {
        "klickTippApi": {
          "id": "K9JyBdCM4SZc1cXl",
          "name": "DEMO KlickTipp account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "038a339e-323d-4829-a0fc-1da5b24df7bd",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        176,
        96
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "bdfafcfb-e780-42d0-9b84-1c6c957d8aae",
      "name": "Route by SKU and total amount",
      "type": "n8n-nodes-base.switch",
      "position": [
        1008,
        -48
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "Order Value ≥ 100",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "60e8a476-a06c-4d95-9bc2-e8c621bd9a1a",
                    "operator": {
                      "type": "number",
                      "operation": "gte"
                    },
                    "leftValue": "={{ $('Get Adobe Commerce orders').item.json.grand_total }}",
                    "rightValue": 100
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Order contains clothing",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "c42480ed-b454-4604-a4d3-28c5c120497f",
                    "operator": {
                      "type": "boolean",
                      "operation": "true",
                      "singleValue": true
                    },
                    "leftValue": "={{\n  ($('Get Adobe Commerce orders').item.json.items ?? []).some(it => (it.sku ?? '') === 'TEST-002')\n}}",
                    "rightValue": "TEST-002"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {
          "allMatchingOutputs": true
        }
      },
      "typeVersion": 3.2
    },
    {
      "id": "d8262afb-d24e-484c-9132-9985fa325b75",
      "name": "Get Adobe Commerce orders",
      "type": "n8n-nodes-base.magento2",
      "position": [
        368,
        -32
      ],
      "parameters": {
        "options": {},
        "resource": "order",
        "operation": "getAll",
        "returnAll": true,
        "filterJson": "={\n  \"search_criteria\": {\n    \"filter_groups\": [\n      {\n        \"filters\": [\n          {\n            \"field\": \"created_at\",\n            \"condition_type\": \"gteq\",\n            \"value\":\"{{ $now.toUTC().minus({ minutes: 6 }).toFormat('yyyy-LL-dd HH:mm:ss') }}\"\n          }\n        ]\n      }\n    ],\n    \"sortOrders\": [\n      { \"field\": \"created_at\", \"direction\": \"ASC\" }\n    ]\n  }\n}",
        "filterType": "json"
      },
      "credentials": {
        "magento2Api": {
          "id": "qn3bt0IxhXE0Tx0w",
          "name": "(Mykhailo) Magento 2 account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "f499199f-ec8d-4985-a5ff-90938b02f96f",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        480
      ],
      "parameters": {
        "width": 1376,
        "height": 608,
        "content": "Community Node Disclaimer: This workflow uses KlickTipp community nodes.\n\n### Introduction\nThis workflow monitors orders and customers in Adobe Commerce, automatically creating or updating contacts in KlickTipp, enriching profiles for segmentation and automated messaging. Tags are applied dynamically: high-value orders (≥100) receive a \"Premium Customer\" tag, and purchases with certain SKUs (e.g., clothing) are assigned product-based tags. Perfect for e-commerce businesses, online retailers, and digital shops that want to eliminate manual data entry and ensure every buyer and customer receives the right messages.\n\n### Setup Instructions\n1. **KlickTipp Preparation**\n      - Prepare **custom fields**\n       - `Payment ID`\n       - `Total`\n       - `Receipt URL`\n       - `Products`\n      - Prepare **tags**:\n       - `Premium customer`\n       - `Clothing buyer`\n\n2. **Credential Configuration**\n     - Connect your Magento account using an **Access Token/Base URL** from the Magento Admin Dashboard (System → Extensions → Integrations).\n     - Authenticate your KlickTipp connection with **username/password** credentials (API access required).\n\n### Customization\n- **Trigger options:** If your Commerce edition supports **webhooks**, you can replace polling with a **Webhook** trigger.  \n- **Cadence & overlap:** 1–30 min are typical; a 1–2 min overlap in the filter to avoid gaps.  \n- **Routing variants:** Change the SKU list, switch to category checks, or add more value tiers.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "cce7e8d3-7b57-4565-8335-70002f341046",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1232,
        -240
      ],
      "parameters": {
        "color": 7,
        "width": 272,
        "height": 696,
        "content": "## 4. Contact tagging"
      },
      "typeVersion": 1
    },
    {
      "id": "2a7aadec-0257-4fad-9e06-870eafff054f",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        912,
        -240
      ],
      "parameters": {
        "color": 7,
        "width": 304,
        "height": 696,
        "content": "## 3. Routing for tagging"
      },
      "typeVersion": 1
    },
    {
      "id": "6c2240fa-9841-4126-b5e0-2f9a5db40c27",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        576,
        -240
      ],
      "parameters": {
        "color": 7,
        "width": 320,
        "height": 696,
        "content": "## 2. Data saving"
      },
      "typeVersion": 1
    },
    {
      "id": "c4dbb9ba-8709-4a0b-bc48-bf6987269464",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        -240
      ],
      "parameters": {
        "color": 7,
        "width": 428,
        "height": 696,
        "content": "## 1. Data reception "
      },
      "typeVersion": 1
    },
    {
      "id": "b2330c7d-0210-4568-885b-abb46edc2c14",
      "name": "Transfer customers to KlickTipp",
      "type": "n8n-nodes-klicktipp.klicktipp",
      "position": [
        672,
        224
      ],
      "parameters": {
        "email": "={{ $json.email }}",
        "fields": {
          "dataFields": [
            {
              "fieldId": "fieldFirstName",
              "fieldValue": "={{ $json.firstname }}"
            },
            {
              "fieldId": "fieldLastName",
              "fieldValue": "={{ $json.lastname }}"
            },
            {
              "fieldId": "fieldCountry",
              "fieldValue": "={{ $json.addresses[0].country_id }}"
            },
            {
              "fieldId": "fieldState",
              "fieldValue": "={{ $json.addresses[0].region.region }}"
            },
            {
              "fieldId": "fieldCity",
              "fieldValue": "={{ $json.addresses[0].city }}"
            },
            {
              "fieldId": "fieldStreet1",
              "fieldValue": "={{ $json.addresses[0].street[0] }}"
            },
            {
              "fieldId": "fieldZip",
              "fieldValue": "={{ $json.addresses[0].postcode }}"
            },
            {
              "fieldId": "fieldPhone",
              "fieldValue": "={{ $json.addresses[0].telephone }}"
            }
          ]
        },
        "resource": "subscriber",
        "operation": "subscribe"
      },
      "credentials": {
        "klickTippApi": {
          "id": "K9JyBdCM4SZc1cXl",
          "name": "DEMO KlickTipp account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "1ccf8c40-8133-4240-a38a-423ed598633c",
      "name": "Get Adobe Commerce customers",
      "type": "n8n-nodes-base.magento2",
      "position": [
        368,
        224
      ],
      "parameters": {
        "options": {},
        "operation": "getAll",
        "returnAll": true,
        "filterJson": "={\n  \"search_criteria\": {\n    \"filter_groups\": [\n      {\n        \"filters\": [\n          {\n            \"field\": \"updated_at\",\n            \"condition_type\": \"gteq\",\n            \"value\":\"{{ $now.toUTC().minus({ minutes: 6 }).toFormat('yyyy-LL-dd HH:mm:ss') }}\"\n          }\n        ]\n      }\n    ],\n    \"sortOrders\": [\n      { \"field\": \"updated_at\", \"direction\": \"ASC\" }\n    ]\n  }\n}",
        "filterType": "json"
      },
      "credentials": {
        "magento2Api": {
          "id": "qn3bt0IxhXE0Tx0w",
          "name": "(Mykhailo) Magento 2 account"
        }
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "1948e439-c095-4bdf-a630-d001108c5d8a",
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get Adobe Commerce orders",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Adobe Commerce customers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Adobe Commerce orders": {
      "main": [
        [
          {
            "node": "Transfer order data to KlickTipp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Adobe Commerce customers": {
      "main": [
        [
          {
            "node": "Transfer customers to KlickTipp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route by SKU and total amount": {
      "main": [
        [
          {
            "node": "Tag contact for high-value order",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Tag contact for clothing purchase",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transfer order data to KlickTipp": {
      "main": [
        [
          {
            "node": "Route by SKU and total amount",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

相关工作流