{
  "elementsLearnedData": [],
  "elementsTestData": [],
  "flow": {
    "id": "5B8042D9-23ED-4612-BD06-D66345E595C5",
    "name": "weclapp: duplicate customer merge"
  },
  "flowVersion": {
    "clientMetadata": {
      "viewport": {
        "x": 152.43807608731345,
        "y": -45.631985739121774,
        "zoom": 0.5479058832238455
      },
      "autoSave": true,
      "descriptions": {
        "flow": "When a new customer is created in weclapp, looks for an existing customer with the same email or company name, compares the two with their quotation, order and invoice counts, and asks the RevOps owner in Slack which record survives before merging and deleting the other.",
        "initialData": "",
        "initialDataFields": {}
      }
    },
    "description": "When a new customer is created in weclapp, looks for an existing customer with the same email or company name, compares the two with their quotation, order and invoice counts, and asks the RevOps owner in Slack which record survives before merging and deleting the other.",
    "elements": [
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Write the question for the RevOps owner Result"
          },
          "position": {
            "x": -32,
            "y": 474
          }
        },
        "flowElementId": "0161C04D-FDDC-4DD7-8C3A-A1C25B298D15",
        "groupId": null,
        "id": "EA163A2C-9943-4B30-AB11-BE96B1355292",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "newParty",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "New customer",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "AF5DC9E9-8742-4E2B-AE34-316C87DC520E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "existingParty",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Existing customer",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "8065030F-B0A6-4E2B-8439-9F898CA48666"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "matchedOn",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Likely duplicate",
                    "subPathSegments": [
                      {
                        "key": "matchedOn",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3C8E4C79-8FA2-4B27-8543-B3913A5A131A"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "comparison",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Comparison",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "0F975611-7704-4277-B8DF-1F6F5BAFA08C"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "answerLink",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Answer link",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Answer link"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "executionId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EXECUTION_ID",
                    "label": null,
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_PATH",
                    "value": "executionContext.executionId",
                    "valueSegments": [
                      {
                        "key": "executionContext",
                        "optional": false
                      },
                      {
                        "key": "executionId",
                        "optional": false
                      }
                    ]
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const link = (decision) => `${answerLink}?execution=${encodeURIComponent(executionId)}&decision=${decision}`;\nconst name = (p) => p.company || [p.firstName, p.lastName].filter(Boolean).join(' ') || `party ${p.id}`;\nconst label = (p) => (p.customerNumber ? `${name(p)} (${p.customerNumber})` : name(p));\nconst refs = (r) => (r ? `${r.quotations ?? 0} quotations, ${r.orders ?? 0} orders, ${r.invoices ?? 0} invoices` : 'not counted');\nconst c = comparison || {};\nconst lines = [\n  `*Possible duplicate customer in weclapp* (same ${matchedOn})`,\n  `Existing: ${label(existingParty)}, used on ${refs(c.existingRefs)}`,\n  `New: ${label(newParty)}, used on ${refs(c.newRefs)}`,\n  ...(Array.isArray(c.differences) ? c.differences : []).map((d) => `• ${d}`),\n  c.suggestion ? `Suggestion: ${c.suggestion}` : null,\n  'The record you keep takes any email, phone or website it is missing from the other one. The other one is then deleted, if weclapp allows it.',\n].filter(Boolean);\nreturn {\n  text: `Possible duplicate customer in weclapp: ${name(newParty)}`,\n  blocks: [\n    { type: 'section', text: { type: 'mrkdwn', text: lines.join('\\n') } },\n    { type: 'actions', elements: [\n      { type: 'button', style: 'primary', text: { type: 'plain_text', text: `Keep ${label(existingParty)}`.slice(0, 75) }, url: link('existing') },\n      { type: 'button', text: { type: 'plain_text', text: `Keep ${label(newParty)}`.slice(0, 75) }, url: link('new') },\n      { type: 'button', text: { type: 'plain_text', text: 'Not the same customer' }, url: link('none') },\n    ] },\n  ],\n};"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Question card",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Write the question for the RevOps owner",
        "nextElementIds": [
          "4CF3ADA7-12C7-4B4B-9AE6-19E8A47B7CF8"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 702,
            "y": 272
          }
        },
        "flowElementId": "D82CE98F-355F-40CD-89F9-554FEE93A9B4",
        "groupId": null,
        "id": "26E02D67-22F3-43E1-857F-ACE4E250A9FB",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "2a88700e-81a1-4d8a-82eb-c8fb302137c0",
                "nestedOperation": null,
                "operation": "isNotEmpty",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Likely duplicate",
                      "subPathSegments": [
                        {
                          "key": "duplicateId",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "3C8E4C79-8FA2-4B27-8543-B3913A5A131A"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": []
              }
            ],
            "grouping": [
              "2a88700e-81a1-4d8a-82eb-c8fb302137c0"
            ]
          },
          "elseComponent": null,
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Possible duplicate",
          "storeResult": false,
          "thenComponent": {
            "componentId": "8065030F-B0A6-4E2B-8439-9F898CA48666",
            "componentType": "ELEMENT"
          }
        },
        "name": "Possible duplicate?",
        "nextElementIds": [
          "8065030F-B0A6-4E2B-8439-9F898CA48666"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Retrieves a single party by its weclapp identifier, returning the complete record including addresses, bank accounts, contacts, role flags, and the version used for optimistic locking. Use this before updating a party so no unknown property is overwritten.",
          "elementId": "EXTENSION:::SHARED:::default:::weclapp:::getParty",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Load the existing customer Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::weclapp:::getParty",
          "legacyElementId": "JS###v1###Weclapp###getParty",
          "methodName": "getParty",
          "position": {
            "x": 344,
            "y": 266
          }
        },
        "flowElementId": "54C5DE70-B9A3-4FEC-AC86-9BD5D422247B",
        "groupId": null,
        "id": "8065030F-B0A6-4E2B-8439-9F898CA48666",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "partyId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Likely duplicate",
                    "subPathSegments": [
                      {
                        "key": "duplicateId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3C8E4C79-8FA2-4B27-8543-B3913A5A131A"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "getParty",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Existing customer",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "weclapp",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Load the existing customer",
        "nextElementIds": [
          "0F975611-7704-4277-B8DF-1F6F5BAFA08C"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "error-handler",
          "isFirstElement": false,
          "blockDefinitionId": "error-handler",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "weclapp refused the delete Result"
          },
          "position": {
            "x": 350,
            "y": 816
          }
        },
        "flowElementId": "C87CC632-D65A-4953-BC5B-370E841F7187",
        "groupId": null,
        "id": "E5CF92E5-BEA8-4B19-8161-5A886D1AAA1F",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Delete refused",
          "saveToVariable": null,
          "storeResult": true
        },
        "name": "weclapp refused the delete",
        "nextElementIds": [
          "D62EE763-3E60-4FA0-92BE-0BCD6DB4D988"
        ],
        "nextGroupIds": [],
        "type": "ERROR_HANDLER"
      },
      {
        "clientMetadata": {
          "notes": "Permanently deletes a party from weclapp. The request fails when the party is still referenced by quotations, orders, invoices, or other records, in which case deactivate the party instead of deleting it. Returns a confirmation object because weclapp answers a successful delete with an empty body.",
          "elementId": "EXTENSION:::SHARED:::default:::weclapp:::deleteParty",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Delete the duplicate Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::weclapp:::deleteParty",
          "legacyElementId": "JS###v1###Weclapp###deleteParty",
          "methodName": "deleteParty",
          "position": {
            "x": -8,
            "y": 634
          }
        },
        "flowElementId": "576AAB8E-9D45-49B3-A369-EC4E319D2791",
        "groupId": null,
        "id": "0A889C4E-D0AA-4005-92B3-042B646DBF3A",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "partyId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Merge plan",
                    "subPathSegments": [
                      {
                        "key": "duplicateId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "DA8FE9CE-E5F0-412B-B4CD-B7DFF648B8C4"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "deleteParty",
          "onFailElemId": "E5CF92E5-BEA8-4B19-8161-5A886D1AAA1F",
          "packageId": "default",
          "resultAlias": "Deleted duplicate",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "weclapp",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Delete the duplicate",
        "nextElementIds": [
          "0216F1E7-E8AF-4605-BB71-65899FA1ED4F"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Confirm they stay separate Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 1136,
            "y": 630
          }
        },
        "flowElementId": "020B94E5-70B4-4D9F-A817-D2E8E9E92F7D",
        "groupId": null,
        "id": "9CEC573D-F662-48A2-B7E0-F5D496EE8563",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Left as two separate customers. Nothing was changed in weclapp."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question to RevOps",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "4CF3ADA7-12C7-4B4B-9AE6-19E8A47B7CF8"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botIcon",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "replyBroadcast",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageURL",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "blocks",
              "type": "COMPLEX_LIST",
              "value": []
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendMessageToChannel",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Separate note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Confirm they stay separate",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 1092.174869022913,
            "y": 478.3497380458262
          }
        },
        "flowElementId": "26F7AAB5-3D44-4D4C-94B0-51666077AB75",
        "groupId": null,
        "id": "C7304387-F13A-49D9-84FC-739FED2D83E7",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "9ccca3ec-c3fe-493f-9dea-5c2c7d41c50f",
                "nestedOperation": null,
                "operation": "equal",
                "property": {
                  "expression": [
                    {
                      "id": "RESULT",
                      "label": "RevOps decision",
                      "subPathSegments": [
                        {
                          "key": "decision",
                          "optional": false
                        }
                      ],
                      "type": "TRIGGER_DATA",
                      "value": "4C5D72E3-A9AB-4611-81B8-F6844173EC98"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "TEXT",
                        "label": null,
                        "type": "INPUT",
                        "value": "existing"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              },
              {
                "id": "140f8626-6122-4804-839f-8a938e2d08be",
                "nestedOperation": null,
                "operation": "equal",
                "property": {
                  "expression": [
                    {
                      "id": "RESULT",
                      "label": "RevOps decision",
                      "subPathSegments": [
                        {
                          "key": "decision",
                          "optional": false
                        }
                      ],
                      "type": "TRIGGER_DATA",
                      "value": "4C5D72E3-A9AB-4611-81B8-F6844173EC98"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "TEXT",
                        "label": null,
                        "type": "INPUT",
                        "value": "new"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              }
            ],
            "grouping": [
              "9ccca3ec-c3fe-493f-9dea-5c2c7d41c50f",
              "OR",
              "140f8626-6122-4804-839f-8a938e2d08be"
            ]
          },
          "elseComponent": {
            "componentId": "9CEC573D-F662-48A2-B7E0-F5D496EE8563",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Merge them",
          "storeResult": false,
          "thenComponent": {
            "componentId": "DA8FE9CE-E5F0-412B-B4CD-B7DFF648B8C4",
            "componentType": "ELEMENT"
          }
        },
        "name": "Merge them?",
        "nextElementIds": [
          "DA8FE9CE-E5F0-412B-B4CD-B7DFF648B8C4",
          "9CEC573D-F662-48A2-B7E0-F5D496EE8563"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Retrieves a single party by its weclapp identifier, returning the complete record including addresses, bank accounts, contacts, role flags, and the version used for optimistic locking. Use this before updating a party so no unknown property is overwritten.",
          "elementId": "EXTENSION:::SHARED:::default:::weclapp:::getParty",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Load the new customer Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::weclapp:::getParty",
          "legacyElementId": "JS###v1###Weclapp###getParty",
          "methodName": "getParty",
          "position": {
            "x": 352,
            "y": 130
          }
        },
        "flowElementId": "B1DDCFAC-3A3D-4FCF-BD0E-9B6BCED0889A",
        "groupId": null,
        "id": "AF5DC9E9-8742-4E2B-AE34-316C87DC520E",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "partyId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New party",
                    "subPathSegments": [
                      {
                        "key": "entityId",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "72DC42BE-1FB7-4CAA-BFBA-8FDED7BE5750"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "getParty",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "New customer",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "weclapp",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Load the new customer",
        "nextElementIds": [
          "8F6D9751-091F-44DD-B8FC-C23CEFD2B1C6"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Ask the RevOps owner Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 364,
            "y": 468
          }
        },
        "flowElementId": "73E94CBF-BDC5-49EB-956F-1C7FA75435AD",
        "groupId": null,
        "id": "4CF3ADA7-12C7-4B4B-9AE6-19E8A47B7CF8",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question card",
                    "subPathSegments": [
                      {
                        "key": "text",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "EA163A2C-9943-4B30-AB11-BE96B1355292"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botIcon",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "replyBroadcast",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageURL",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "blocks",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question card",
                    "subPathSegments": [
                      {
                        "key": "blocks",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "EA163A2C-9943-4B30-AB11-BE96B1355292"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendMessageToChannel",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Question to RevOps",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Ask the RevOps owner",
        "nextElementIds": [
          "4C5D72E3-A9AB-4611-81B8-F6844173EC98"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "external-callback",
          "isFirstElement": false,
          "blockDefinitionId": "external-callback",
          "position": {
            "x": 678,
            "y": 474
          }
        },
        "flowElementId": "95307FBA-798E-4F0A-9913-C7C3703308EF",
        "groupId": null,
        "id": "4C5D72E3-A9AB-4611-81B8-F6844173EC98",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "resultAlias": "RevOps decision",
          "slaConditions": [],
          "storeResult": true,
          "type": "CALLBACK"
        },
        "name": "Wait for the RevOps owner's answer",
        "nextElementIds": [
          "C7304387-F13A-49D9-84FC-739FED2D83E7"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "clientMetadata": {
          "notes": "Lists parties from the weclapp CRM. A party is the single record type weclapp uses for customers, suppliers, sales partners, leads, and contact persons, so filter by role to narrow the result. Supports name and email matching, pagination (default 100 records per page, maximum 1000), and sorting by any simple property such as lastModifiedDate or customerNumber.",
          "elementId": "EXTENSION:::SHARED:::default:::weclapp:::listParties",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Look for the same email Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::weclapp:::listParties",
          "legacyElementId": "JS###v1###Weclapp###listParties",
          "methodName": "listParties",
          "position": {
            "x": 690,
            "y": 130
          }
        },
        "flowElementId": "06AA75C2-3FEE-4C90-9B0B-F5F07753938B",
        "groupId": null,
        "id": "8F6D9751-091F-44DD-B8FC-C23CEFD2B1C6",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "role",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "customer"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "partyType",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "name",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "email",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "New customer",
                    "subPathSegments": [
                      {
                        "key": "email",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AF5DC9E9-8742-4E2B-AE34-316C87DC520E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "customerNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "modifiedAfter",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "page",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "pageSize",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "NUMBER",
                    "label": null,
                    "type": "INPUT",
                    "value": 20
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sortBy",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sortDirection",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "properties",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "listParties",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Same email",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "weclapp",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Look for the same email",
        "nextElementIds": [
          "159D904A-E5DF-47EC-987A-2416FE3C8E0C"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "ai-agent",
          "isFirstElement": false,
          "blockDefinitionId": "ai-agent",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Compare the two records Result"
          },
          "tools": {
            "EXTENSION:::SHARED:::default:::weclapp:::listQuotations": {
              "elementId": "EXTENSION:::SHARED:::default:::weclapp:::listQuotations",
              "dynamicOptionsLabels": {}
            },
            "EXTENSION:::SHARED:::default:::weclapp:::listSalesOrders": {
              "elementId": "EXTENSION:::SHARED:::default:::weclapp:::listSalesOrders",
              "dynamicOptionsLabels": {}
            },
            "EXTENSION:::SHARED:::default:::weclapp:::listSalesInvoices": {
              "elementId": "EXTENSION:::SHARED:::default:::weclapp:::listSalesInvoices",
              "dynamicOptionsLabels": {}
            }
          },
          "position": {
            "x": -20,
            "y": 266
          }
        },
        "flowElementId": "81F2597E-B813-451D-BD87-80EDCB9CF9F0",
        "groupId": null,
        "id": "0F975611-7704-4277-B8DF-1F6F5BAFA08C",
        "metaInfo": {
          "aiApiKey": null,
          "aiModel": "claude-sonnet-5",
          "aiProvider": "ANTHROPIC",
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "dynamicAiApiKey": {
            "expression": [
              {
                "id": "PLACEHOLDER_DATA",
                "label": "Anthropic key",
                "subPathSegments": null,
                "type": "EXECUTION_CONTEXT_STATIC_DATA",
                "value": "Anthropic key"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "files": [],
          "forceParsedOutput": true,
          "langSmithSettings": {
            "enabled": false,
            "apiKey": null,
            "projectName": null,
            "label": "FlowRunner AI-Agent",
            "accountCluster": "US"
          },
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "messagesHistoryEnabled": false,
          "messagesHistoryLimit": 15,
          "onFailElemId": null,
          "resultAlias": "Comparison",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "systemPrompt": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "You compare two weclapp customer records that may be the same customer. For each record, call List Quotations, List Sales Orders and List Sales Invoices with that record's id as customerId, and count the records each one returns. Then reply with JSON only, with these fields:\nexistingRefs: an object with quotations, orders and invoices, the counts for the existing record\nnewRefs: an object with quotations, orders and invoices, the counts for the new record\ndifferences: a list of short lines comparing customer number, addresses, bank accounts, contacts, email and phone, saying where the two records match and where they differ\nsuggestion: one sentence on which record to keep, preferring the one more quotations, orders and invoices point to, and noting that weclapp will not delete a record any of them still use"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "tools": [
            {
              "connectionId": null,
              "definition": {},
              "enabled": true,
              "hostType": "SHARED",
              "methodName": "listQuotations",
              "name": "List Quotations",
              "notes": "Lists sales quotations with their status, customer, validity dates, and calculated net and gross amounts. Filter by status, customer, or quotation date range to build pipeline reports or to find quotations awaiting a decision.",
              "packageId": "default",
              "params": [
                {
                  "name": "status",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "customerId",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "quotationNumber",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "quotationDateFrom",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "quotationDateTo",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "page",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "pageSize",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [
                      {
                        "id": "NUMBER",
                        "label": null,
                        "type": "INPUT",
                        "value": 1000
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "sortBy",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "sortDirection",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                }
              ],
              "serviceId": "weclapp",
              "type": "FR_FUNCTION"
            },
            {
              "connectionId": null,
              "definition": {},
              "enabled": true,
              "hostType": "SHARED",
              "methodName": "listSalesOrders",
              "name": "List Sales Orders",
              "notes": "Lists sales orders with their status, customer, order date, planned shipping and delivery dates, and calculated totals. Also exposes the derived shipped, invoiced, and paid flags, which makes this the usual starting point for order fulfillment and dunning workflows.",
              "packageId": "default",
              "params": [
                {
                  "name": "status",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "customerId",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "orderNumber",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "orderDateFrom",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "orderDateTo",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "page",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "pageSize",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [
                      {
                        "id": "NUMBER",
                        "label": null,
                        "type": "INPUT",
                        "value": 1000
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "sortBy",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "sortDirection",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                }
              ],
              "serviceId": "weclapp",
              "type": "FR_FUNCTION"
            },
            {
              "connectionId": null,
              "definition": {},
              "enabled": true,
              "hostType": "SHARED",
              "methodName": "listSalesInvoices",
              "name": "List Sales Invoices",
              "notes": "Lists sales invoices with their document status, payment status, invoice and due dates, and calculated totals. Filtering by payment status Open together with a due date cutoff is the usual way to build an overdue receivables list.",
              "packageId": "default",
              "params": [
                {
                  "name": "status",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "paymentStatus",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "customerId",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "invoiceNumber",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "invoiceDateFrom",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "invoiceDateTo",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "dueBefore",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "page",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "pageSize",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [
                      {
                        "id": "NUMBER",
                        "label": null,
                        "type": "INPUT",
                        "value": 1000
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "sortBy",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "sortDirection",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                }
              ],
              "serviceId": "weclapp",
              "type": "FR_FUNCTION"
            }
          ],
          "type": "AI_AGENT",
          "userPrompt": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "The two records matched on "
              },
              {
                "id": "ELEMENT_RESULT",
                "label": "Likely duplicate",
                "subPathSegments": [
                  {
                    "key": "matchedOn",
                    "optional": false
                  }
                ],
                "type": "ELEMENT_LINK",
                "value": "3C8E4C79-8FA2-4B27-8543-B3913A5A131A"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": ".\n\nExisting record, id "
              },
              {
                "id": "ELEMENT_RESULT",
                "label": "Existing customer",
                "subPathSegments": [
                  {
                    "key": "id",
                    "optional": false
                  }
                ],
                "type": "ELEMENT_LINK",
                "value": "8065030F-B0A6-4E2B-8439-9F898CA48666"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": ":\n"
              },
              {
                "id": "ELEMENT_RESULT",
                "label": "Existing customer",
                "subPathSegments": null,
                "type": "ELEMENT_LINK",
                "value": "8065030F-B0A6-4E2B-8439-9F898CA48666"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "\n\nNew record, id "
              },
              {
                "id": "ELEMENT_RESULT",
                "label": "New customer",
                "subPathSegments": [
                  {
                    "key": "id",
                    "optional": false
                  }
                ],
                "type": "ELEMENT_LINK",
                "value": "AF5DC9E9-8742-4E2B-AE34-316C87DC520E"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": ":\n"
              },
              {
                "id": "ELEMENT_RESULT",
                "label": "New customer",
                "subPathSegments": null,
                "type": "ELEMENT_LINK",
                "value": "AF5DC9E9-8742-4E2B-AE34-316C87DC520E"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          }
        },
        "name": "Compare the two records",
        "nextElementIds": [
          "EA163A2C-9943-4B30-AB11-BE96B1355292"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Lists parties from the weclapp CRM. A party is the single record type weclapp uses for customers, suppliers, sales partners, leads, and contact persons, so filter by role to narrow the result. Supports name and email matching, pagination (default 100 records per page, maximum 1000), and sorting by any simple property such as lastModifiedDate or customerNumber.",
          "elementId": "EXTENSION:::SHARED:::default:::weclapp:::listParties",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Look for the same company name Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::weclapp:::listParties",
          "legacyElementId": "JS###v1###Weclapp###listParties",
          "methodName": "listParties",
          "position": {
            "x": 980,
            "y": 130
          }
        },
        "flowElementId": "7E24D08C-EC26-4D4E-A0CA-A6605CD90050",
        "groupId": null,
        "id": "159D904A-E5DF-47EC-987A-2416FE3C8E0C",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "role",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "customer"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "partyType",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "name",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "New customer",
                    "subPathSegments": [
                      {
                        "key": "company",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AF5DC9E9-8742-4E2B-AE34-316C87DC520E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "email",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "customerNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "modifiedAfter",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "page",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "pageSize",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "NUMBER",
                    "label": null,
                    "type": "INPUT",
                    "value": 20
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sortBy",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sortDirection",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "properties",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "listParties",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Same name",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "weclapp",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Look for the same company name",
        "nextElementIds": [
          "3C8E4C79-8FA2-4B27-8543-B3913A5A131A"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Pick the likely duplicate Result"
          },
          "position": {
            "x": 1014.686784647053,
            "y": 263.4217447973466
          }
        },
        "flowElementId": "4ADC0EFA-18A5-4697-9217-3CA041D6F04E",
        "groupId": null,
        "id": "3C8E4C79-8FA2-4B27-8543-B3913A5A131A",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "newParty",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "New customer",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "AF5DC9E9-8742-4E2B-AE34-316C87DC520E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "byEmail",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Same email",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "8F6D9751-091F-44DD-B8FC-C23CEFD2B1C6"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "byName",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Same name",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "159D904A-E5DF-47EC-987A-2416FE3C8E0C"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "if (!newParty || !newParty.customer) return { duplicateId: '', matchedOn: '' };\nconst norm = (s) => String(s || '').trim().toLowerCase();\nconst email = norm(newParty.email);\nconst company = norm(newParty.company);\nconst others = (list) => (Array.isArray(list) ? list : []).filter((p) => p && String(p.id) !== String(newParty.id));\nconst emailMatch = email ? others(byEmail).find((p) => norm(p.email) === email) : null;\nconst nameMatch = company ? others(byName).find((p) => norm(p.company) === company) : null;\nconst match = emailMatch || nameMatch;\nreturn {\n  duplicateId: match ? String(match.id) : '',\n  matchedOn: emailMatch ? 'email' : nameMatch ? 'company name' : '',\n};"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Likely duplicate",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Pick the likely duplicate",
        "nextElementIds": [
          "26E02D67-22F3-43E1-857F-ACE4E250A9FB"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Work out the merge Result"
          },
          "position": {
            "x": 738,
            "y": 648
          }
        },
        "flowElementId": "708525AF-3549-45B2-83D6-07C21D7DAB47",
        "groupId": null,
        "id": "DA8FE9CE-E5F0-412B-B4CD-B7DFF648B8C4",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "decision",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "RevOps decision",
                    "subPathSegments": [
                      {
                        "key": "decision",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "4C5D72E3-A9AB-4611-81B8-F6844173EC98"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "newParty",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "New customer",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "AF5DC9E9-8742-4E2B-AE34-316C87DC520E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "existingParty",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Existing customer",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "8065030F-B0A6-4E2B-8439-9F898CA48666"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const keepNew = decision === 'new';\nconst keep = keepNew ? newParty : existingParty;\nconst drop = keepNew ? existingParty : newParty;\nconst name = (p) => p.company || [p.firstName, p.lastName].filter(Boolean).join(' ') || `party ${p.id}`;\nconst label = (p) => (p.customerNumber ? `${name(p)} (${p.customerNumber})` : name(p));\nconst fill = (field) => (!keep[field] && drop[field] ? drop[field] : '');\nreturn {\n  survivorId: String(keep.id),\n  duplicateId: String(drop.id),\n  survivorName: label(keep),\n  duplicateName: label(drop),\n  email: fill('email'),\n  phone: fill('phone'),\n  website: fill('website'),\n};"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Merge plan",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Work out the merge",
        "nextElementIds": [
          "14FFFDEA-B4FC-4B5E-A432-B03ADFB03B2E"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Confirm the merge Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 2,
            "y": 820
          }
        },
        "flowElementId": "6BC81EB5-45CE-4833-9198-F892DFBED1A5",
        "groupId": null,
        "id": "0216F1E7-E8AF-4605-BB71-65899FA1ED4F",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Merged. "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Merge plan",
                    "subPathSegments": [
                      {
                        "key": "survivorName",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "DA8FE9CE-E5F0-412B-B4CD-B7DFF648B8C4"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " stays, and "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Merge plan",
                    "subPathSegments": [
                      {
                        "key": "duplicateName",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "DA8FE9CE-E5F0-412B-B4CD-B7DFF648B8C4"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " is deleted from weclapp."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question to RevOps",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "4CF3ADA7-12C7-4B4B-9AE6-19E8A47B7CF8"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botIcon",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "replyBroadcast",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageURL",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "blocks",
              "type": "COMPLEX_LIST",
              "value": []
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendMessageToChannel",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Merge note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Confirm the merge",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Recommend deactivating it Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 728,
            "y": 806
          }
        },
        "flowElementId": "AEAF470A-4014-48C5-850A-6AC6C855741F",
        "groupId": null,
        "id": "D62EE763-3E60-4FA0-92BE-0BCD6DB4D988",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Merge plan",
                    "subPathSegments": [
                      {
                        "key": "survivorName",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "DA8FE9CE-E5F0-412B-B4CD-B7DFF648B8C4"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " now has the merged details, but weclapp would not delete "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Merge plan",
                    "subPathSegments": [
                      {
                        "key": "duplicateName",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "DA8FE9CE-E5F0-412B-B4CD-B7DFF648B8C4"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " because quotations, orders or invoices still use it. Deactivate it in weclapp instead. weclapp said: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Delete refused",
                    "subPathSegments": [
                      {
                        "key": "message",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E5CF92E5-BEA8-4B19-8161-5A886D1AAA1F"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question to RevOps",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "4CF3ADA7-12C7-4B4B-9AE6-19E8A47B7CF8"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botIcon",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "replyBroadcast",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageURL",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "blocks",
              "type": "COMPLEX_LIST",
              "value": []
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendMessageToChannel",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Deactivation note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Recommend deactivating it",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Updates an existing party. A weclapp PUT replaces the whole record and treats omitted properties as null, so this action first reads the current party, merges the supplied changes into it, and writes the result back. That keeps addresses, custom attributes, and properties this action does not expose intact, and it carries the current version forward for optimistic locking.",
          "elementId": "EXTENSION:::SHARED:::default:::weclapp:::updateParty",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Merge into the record that stays Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::weclapp:::updateParty",
          "legacyElementId": "JS###v1###Weclapp###updateParty",
          "methodName": "updateParty",
          "position": {
            "x": 322,
            "y": 634
          }
        },
        "flowElementId": "739140B4-3DB9-46B4-8B66-9E14B71DCFEF",
        "groupId": null,
        "id": "14FFFDEA-B4FC-4B5E-A432-B03ADFB03B2E",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "partyId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Merge plan",
                    "subPathSegments": [
                      {
                        "key": "survivorId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "DA8FE9CE-E5F0-412B-B4CD-B7DFF648B8C4"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "company",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "firstName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "lastName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "email",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Merge plan",
                    "subPathSegments": [
                      {
                        "key": "email",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "DA8FE9CE-E5F0-412B-B4CD-B7DFF648B8C4"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "phone",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Merge plan",
                    "subPathSegments": [
                      {
                        "key": "phone",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "DA8FE9CE-E5F0-412B-B4CD-B7DFF648B8C4"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "website",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Merge plan",
                    "subPathSegments": [
                      {
                        "key": "website",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "DA8FE9CE-E5F0-412B-B4CD-B7DFF648B8C4"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "leadStatus",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "responsibleUserId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "description",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "tags",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "updateParty",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Merged record",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "weclapp",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Merge into the record that stays",
        "nextElementIds": [
          "0A889C4E-D0AA-4005-92B3-042B646DBF3A"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Fires when a weclapp record of the selected entity is created, updated, or deleted. FlowRunner registers a weclapp webhook for the entity when the flow is deployed and removes it when the flow is stopped. The weclapp callback carries only the entity name, the record identifier, and the event type, so add a Get action such as Get Party or Get Sales Order to load the full record.",
          "elementId": "EXTENSION:::SHARED:::default:::weclapp:::onRecordEvent",
          "isFirstElement": true,
          "blockDefinitionId": "api-service-trigger",
          "newElementId": "EXTENSION:::SHARED:::default:::weclapp:::onRecordEvent",
          "legacyElementId": "JS###v1###Weclapp###onRecordEvent",
          "methodName": "onRecordEvent",
          "position": {
            "x": 12,
            "y": 128
          }
        },
        "flowElementId": "1E4E8D35-419E-4399-BC5A-7EA8EB144842",
        "groupId": null,
        "id": "72DC42BE-1FB7-4CAA-BFBA-8FDED7BE5750",
        "metaInfo": {
          "callbackUrl": null,
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "connectionId": null,
          "eventName": "onRecordEvent",
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "New party",
          "scope": "SINGLE_APP",
          "serviceId": "weclapp",
          "slaConditions": [],
          "staticData": {
            "entityName": "party",
            "eventTypes": [
              "CREATE"
            ]
          },
          "storeResult": true,
          "subtype": "REALTIME",
          "type": "CUSTOM"
        },
        "name": "New customer in weclapp",
        "nextElementIds": [
          "AF5DC9E9-8742-4E2B-AE34-316C87DC520E"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      }
    ],
    "firstElementId": "72DC42BE-1FB7-4CAA-BFBA-8FDED7BE5750",
    "groups": [],
    "id": "6A71979E-3951-4E48-AA25-C58C2516ADF7",
    "metaInfo": {
      "clientValidationState": {
        "errorMessage": null,
        "valid": true
      },
      "errorMessage": null,
      "executionStaticData": [
        {
          "description": "Your Anthropic API key, used to compare the two records.",
          "error": null,
          "name": "Anthropic key",
          "type": "API_KEY",
          "value": null
        },
        {
          "description": "The URL of the block Wait for the RevOps owner's answer. The Slack buttons open it.",
          "error": null,
          "name": "Answer link",
          "type": "STRING",
          "value": ""
        }
      ],
      "initialData": null,
      "initialDataDefaultValues": {},
      "ownerFlowVersionId": null,
      "schedule": null,
      "sharedMemory": {
        "anchor": {
          "missingAnchorPolicy": null,
          "path": null,
          "type": "FLOW_MEMORY"
        },
        "expirationInSec": null
      },
      "wasLive": false
    }
  },
  "slaCalendars": [],
  "slaGoals": [],
  "subFlows": [],
  "exportDate": "2026-11-17T05:55:49.420Z"
}
