{
  "format": "manual-highlevel-workflow-recipe",
  "name": "QuietPass — recover original CRM write (OFF)",
  "version": 1,
  "published": false,
  "automaticTriggers": false,
  "authentication": {
    "type": "protected-bearer-credential",
    "origin": "https://quietpass.com",
    "exportCredentials": false
  },
  "steps": [
    {
      "id": "original-references",
      "type": "read-original-execution",
      "requires": [
        "qp_phone_operation_id",
        "qp_phone_source_receipt"
      ],
      "purpose": "Use the original receipt and operation. A missing operation ID requires review of the original request, not a new purchase."
    },
    {
      "id": "recover",
      "type": "custom-webhook",
      "method": "GET",
      "url": "https://quietpass.com/v1/automation/highlevel/{{ORIGINAL_OPERATION_UUID}}",
      "saveResponse": true,
      "followRedirects": false
    },
    {
      "id": "reread-source",
      "type": "current-contact-fields",
      "purpose": "Resolve fresh contact fields in the original location. Do not treat Find Contact as a reread of an enrolled contact; qualify native field freshness first."
    },
    {
      "id": "guard-write",
      "type": "custom-code",
      "helper": "writeGuard"
    },
    {
      "id": "write-owned-fields",
      "type": "update-contact-fields",
      "condition": "guard-write.write === true",
      "purpose": "Write only fields selected by the original profile. No prepare, run, purchase, or limit change exists in this workflow."
    }
  ]
}
