{
  "name": "Sync contacts, consent, and segments between KlickTipp and Salesforce",
  "nodes": [
    {
      "id": "119ed438-77b0-41b4-930d-177024233c13",
      "name": "Daily Cleanup Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        1264,
        864
      ]
    },
    {
      "id": "9a43cfd5-402b-4925-b88b-98f450842e38",
      "name": "Delete contact",
      "type": "n8n-nodes-klicktipp.klicktipp",
      "position": [
        2288,
        864
      ]
    },
    {
      "id": "0acbdd3f-65f6-42a7-a039-4914b882e231",
      "name": "Contact tagged in KlickTipp",
      "type": "n8n-nodes-klicktipp.klicktippTrigger",
      "position": [
        1264,
        48
      ]
    },
    {
      "id": "31fbf0f5-2d0a-494b-a30b-315f34d0f414",
      "name": "Update Salesforce Contact",
      "type": "n8n-nodes-base.salesforce",
      "position": [
        2288,
        144
      ]
    },
    {
      "id": "a7f67f98-d129-4ef2-896b-e694925d9347",
      "name": "Create Salesforce Contact",
      "type": "n8n-nodes-base.salesforce",
      "position": [
        2288,
        -48
      ]
    },
    {
      "id": "543d1541-f49f-48c2-addc-6f1ee85062bb",
      "name": "New Salesforce Contact",
      "type": "n8n-nodes-base.salesforceTrigger",
      "position": [
        1264,
        336
      ]
    },
    {
      "id": "e6d5b3f3-b9d8-420b-b64a-66de3af7131e",
      "name": "Updated Salesforce Contact",
      "type": "n8n-nodes-base.salesforceTrigger",
      "position": [
        1264,
        528
      ]
    },
    {
      "id": "846fe9e2-3edd-4674-8cdf-2d6492ac5e2b",
      "name": "Data Normalization & Mapping",
      "type": "n8n-nodes-base.set",
      "position": [
        1488,
        432
      ]
    },
    {
      "id": "410ca368-c7b5-481e-9b02-393c03ef4af0",
      "name": "Fetch Deleted SF Contacts",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1488,
        864
      ]
    },
    {
      "id": "5100372d-510c-4fdb-acae-4a7e7bfdd215",
      "name": "Get KlickTipp Tags",
      "type": "n8n-nodes-klicktipp.klicktipp",
      "position": [
        3136,
        48
      ]
    },
    {
      "id": "85f11fe5-5f94-4229-b53f-46992ebe1def",
      "name": "Assign SF Topic (Customer)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3632,
        -48
      ]
    },
    {
      "id": "53f2f2e1-2f21-4933-a4cf-37de2c087fbc",
      "name": "Assign SF Topic (ABC)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3632,
        144
      ]
    },
    {
      "id": "b8069876-4b93-4c91-a8ab-5fc71e518d64",
      "name": "Sync SF ID to KlickTipp",
      "type": "n8n-nodes-klicktipp.klicktipp",
      "position": [
        2592,
        -48
      ]
    },
    {
      "id": "2e1d5973-7fb9-44c7-85fc-933f92592dad",
      "name": "Create KlickTipp Subscriber",
      "type": "n8n-nodes-klicktipp.klicktipp",
      "position": [
        2288,
        352
      ]
    },
    {
      "id": "a35ac217-33d3-4b84-94df-ac6cbbeb6d59",
      "name": "Sync KlickTipp ID to SF",
      "type": "n8n-nodes-base.salesforce",
      "position": [
        2592,
        352
      ]
    },
    {
      "id": "e955a79f-0b7d-40a8-bcf4-630b0914e251",
      "name": "Update KlickTipp Subscriber",
      "type": "n8n-nodes-klicktipp.klicktipp",
      "position": [
        2288,
        528
      ]
    },
    {
      "id": "6a1aad07-86e9-4226-840d-68a0aeb8c158",
      "name": "Get Salesforce Topics",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3136,
        432
      ]
    },
    {
      "id": "26cfaf48-36e2-442d-83df-0a3aeded0dde",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1216,
        -160
      ],
      "parameters": {
        "width": 448,
        "height": 1552,
        "content": "## 1. Get contact data."
      }
    },
    {
      "id": "914171d2-79be-4402-aaee-612ef3397dd2",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1936,
        -160
      ],
      "parameters": {
        "width": null,
        "height": 1552,
        "content": "## 3. Route by subscription."
      }
    },
    {
      "id": "5ea09d98-39ca-46e3-b7ad-44a8d0f1c87e",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2192,
        -160
      ],
      "parameters": {
        "width": 304,
        "height": 1552,
        "content": "## 4. Transfer contact data."
      }
    },
    {
      "id": "a367b711-56a6-41ce-b4eb-0bf678aaa52a",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2512,
        -160
      ],
      "parameters": {
        "width": 544,
        "height": 1552,
        "content": "## 5. Save IDs & Status"
      }
    },
    {
      "id": "c99deb8d-a984-4463-bce5-52c888434fcb",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3072,
        -160
      ],
      "parameters": {
        "width": null,
        "height": 1552,
        "content": "## 6. Get full contact"
      }
    },
    {
      "id": "fb6d5233-ebea-4acb-a4e2-50636c89cce4",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3328,
        -160
      ],
      "parameters": {
        "width": 496,
        "height": 1552,
        "content": "## 7. Segmentation."
      }
    },
    {
      "id": "c2c7ae37-427d-4305-8514-658ac29aaf14",
      "name": "Salesforce Lookup Switch",
      "type": "n8n-nodes-base.if",
      "position": [
        2000,
        48
      ]
    },
    {
      "id": "346001ed-29c1-4fc3-a86f-40f4bb977243",
      "name": "KlickTipp Lookup Switch",
      "type": "n8n-nodes-base.if",
      "position": [
        2000,
        432
      ]
    },
    {
      "id": "3a40badc-616d-4b3c-87fb-f11bd31cf77c",
      "name": "Documentation Sticky",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        464,
        -160
      ],
      "parameters": {
        "width": 727,
        "height": 416,
        "content": "## How it works\nThis workflow creates a two-way synchronization between **KlickTipp** and **Salesforce Contacts**. Whenever a contact is created, updated, or deleted, the changes are mirrored across b"
      }
    },
    {
      "id": "c845f605-2777-4e24-978c-d2d36b2a460d",
      "name": "Segment Matcher (SF to KT)",
      "type": "n8n-nodes-base.switch",
      "position": [
        3392,
        608
      ]
    },
    {
      "id": "030a8e68-8ddc-44f1-bd8f-a28a1ffe3adb",
      "name": "Segment Matcher (KT to SF)",
      "type": "n8n-nodes-base.switch",
      "position": [
        3392,
        48
      ]
    },
    {
      "id": "1bae0c48-1e79-4b26-9e85-d20203d8f48c",
      "name": "Apply Tag: Customer",
      "type": "n8n-nodes-klicktipp.klicktipp",
      "position": [
        3632,
        512
      ]
    },
    {
      "id": "5f2bff09-fe9b-4a3b-ab67-9000dcf30834",
      "name": "Apply Tag: ABC",
      "type": "n8n-nodes-klicktipp.klicktipp",
      "position": [
        3632,
        704
      ]
    },
    {
      "id": "c2981943-5690-408a-972d-bbcfe5ced62d",
      "name": "Apply Default Tag",
      "type": "n8n-nodes-klicktipp.klicktipp",
      "position": [
        3632,
        352
      ]
    },
    {
      "id": "e7e0c6ed-8aaf-4da6-90cc-170dd5122837",
      "name": "GDPR Deletion Request Trigger",
      "type": "n8n-nodes-klicktipp.klicktippTrigger",
      "position": [
        1264,
        1152
      ]
    },
    {
      "id": "898ae321-5d52-4ec3-ad91-bf002b10d904",
      "name": "Is SF Link Present?",
      "type": "n8n-nodes-base.filter",
      "position": [
        1760,
        1152
      ]
    },
    {
      "id": "5247f3f0-da1f-41de-bbe5-efc6c23b26a9",
      "name": "GDPR Delete Salesforce Contact",
      "type": "n8n-nodes-base.salesforce",
      "position": [
        2288,
        1152
      ]
    },
    {
      "id": "0aa8e11c-e8f9-4c29-924b-3ba2a28e08a2",
      "name": "Check Subscription Status",
      "type": "n8n-nodes-klicktipp.klicktipp",
      "position": [
        2592,
        528
      ]
    },
    {
      "id": "709efe4a-2669-4489-a432-e0c22689349f",
      "name": "Sync Marketing Status to SF",
      "type": "n8n-nodes-base.salesforce",
      "position": [
        2816,
        528
      ]
    },
    {
      "id": "888ffad8-10fd-4220-a7e8-64425185acca",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1680,
        -160
      ],
      "parameters": {
        "width": null,
        "height": 1552,
        "content": "## 2. Filter\n"
      }
    },
    {
      "id": "45d976d7-2667-499b-9b99-bc7fae478a0f",
      "name": "Ignore API Auto-Updates",
      "type": "n8n-nodes-base.filter",
      "position": [
        1760,
        432
      ]
    }
  ],
  "connections": {
    "Get KlickTipp Tags": {
      "main": [
        [
          {
            "node": "Segment Matcher (KT to SF)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is SF Link Present?": {
      "main": [
        [
          {
            "node": "GDPR Delete Salesforce Contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily Cleanup Trigger": {
      "main": [
        [
          {
            "node": "Fetch Deleted SF Contacts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Salesforce Topics": {
      "main": [
        [
          {
            "node": "Segment Matcher (SF to KT)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "New Salesforce Contact": {
      "main": [
        [
          {
            "node": "Data Normalization & Mapping",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ignore API Auto-Updates": {
      "main": [
        [
          {
            "node": "KlickTipp Lookup Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "KlickTipp Lookup Switch": {
      "main": [
        [
          {
            "node": "Create KlickTipp Subscriber",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update KlickTipp Subscriber",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sync KlickTipp ID to SF": {
      "main": [
        [
          {
            "node": "Get Salesforce Topics",
            "type": "main",
            "index": 0
          },
          {
            "node": "Apply Default Tag",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sync SF ID to KlickTipp": {
      "main": [
        [
          {
            "node": "Get KlickTipp Tags",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Salesforce Lookup Switch": {
      "main": [
        [
          {
            "node": "Create Salesforce Contact",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Salesforce Contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Subscription Status": {
      "main": [
        [
          {
            "node": "Sync Marketing Status to SF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Salesforce Contact": {
      "main": [
        [
          {
            "node": "Sync SF ID to KlickTipp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Deleted SF Contacts": {
      "main": [
        [
          {
            "node": "Delete contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Salesforce Contact": {
      "main": [
        [
          {
            "node": "Get KlickTipp Tags",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Segment Matcher (KT to SF)": {
      "main": [
        [
          {
            "node": "Assign SF Topic (Customer)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Assign SF Topic (ABC)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Segment Matcher (SF to KT)": {
      "main": [
        [
          {
            "node": "Apply Tag: Customer",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Apply Tag: ABC",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Updated Salesforce Contact": {
      "main": [
        [
          {
            "node": "Data Normalization & Mapping",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Contact tagged in KlickTipp": {
      "main": [
        [
          {
            "node": "Salesforce Lookup Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create KlickTipp Subscriber": {
      "main": [
        [
          {
            "node": "Sync KlickTipp ID to SF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sync Marketing Status to SF": {
      "main": [
        [
          {
            "node": "Get Salesforce Topics",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update KlickTipp Subscriber": {
      "main": [
        [
          {
            "node": "Check Subscription Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Data Normalization & Mapping": {
      "main": [
        [
          {
            "node": "Ignore API Auto-Updates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GDPR Deletion Request Trigger": {
      "main": [
        [
          {
            "node": "Is SF Link Present?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}