Permanent and immediate: Deletion is irreversible. Any physical materials (posters, packaging, business cards) that carry the deleted QR code will stop working immediately. Ensure all copies of the QR code are retired from circulation before calling this operation.
When to Use
- Campaign end cleanup: After a marketing campaign ends, a cleanup workflow deletes all QR codes created for that campaign to free up quota and prevent old campaign conversations from being initiated.
- Expired offer deactivation: When a limited-time offer expires, an automated workflow deletes the associated QR code so customers cannot initiate a conversation referencing the expired offer after the deadline.
- QR code limit management: When approaching Meta's per-number QR code limit, a housekeeping workflow deletes codes that have not been scanned recently (tracked externally) to make room for new ones.
- Security deactivation: A compromised or misused QR code (e.g. one that was shared beyond its intended audience) is deleted immediately to stop new conversations being initiated through it.
- Tenant offboarding: When a client terminates their subscription, the offboarding workflow deletes all QR codes associated with their phone number as part of the data cleanup process.
Configuration
Connection
| Field | Required | Description |
accessToken | Required | Permanent System User access token. Store in BizFirst Credentials Manager. |
phoneNumberId | Required | Numeric string ID of the phone number that owns this QR code. |
apiVersion | Optional | Meta Graph API version. Defaults to v18.0. |
Operation
| Field | Required | Description |
qrCodeId | Required | The QR code identifier (the code string returned by qr-code/create). |
Sample Configuration
{
"resource": "qrcode",
"operation": "delete",
"accessToken": "{{ $credentials.whatsAppToken }}",
"phoneNumberId": "123456789012345",
"qrCodeId": "4RNL66ENMHZJ7A1"
}
Validation Errors
| Error | Cause |
accessToken is required | The accessToken field is empty. |
phoneNumberId is required | No Phone Number ID supplied. |
qrCodeId is required | No QR code identifier provided. |
100 (Meta) | QR code not found — already deleted or never created under this phone number. |
200 (Meta) | Insufficient permissions to delete this QR code. |
Output
Success Port
| Field | Type | Description |
success | bool | true when the QR code was permanently deleted. |
code | string | The deleted QR code identifier (echoed for audit purposes). |
status | string | "deleted". |
rawResponse | string | Full raw JSON from the Meta Graph API. |
Error Port
| Field | Type | Description |
code | string | The QR code identifier echoed from input. |
status | string | "failed" or "error". |
errorCode | string | Meta error code or "timeout". |
errorMessage | string | Human-readable error description. |
Sample Output
{
"success": true,
"code": "4RNL66ENMHZJ7A1",
"status": "deleted",
"rawResponse": "{\"success\":true}"
}
Expression Reference
| Value | Expression | Notes |
| Deletion success | {{ $output.deleteQr.success }} | Gate the database cleanup step on this boolean — only mark as deleted locally if Meta confirmed deletion. |
| Deleted code ID | {{ $output.deleteQr.code }} | Use to update the local QR code inventory record to status: deleted. |
Node Policies & GuardRails
| Policy Area | Recommendation |
| Credential storage | Store the access token in BizFirst Credentials Manager. |
| Physical materials check | Before deleting, confirm all physical materials carrying the QR code have been retired from public display. Deletion is immediate — a customer scanning a retired poster will receive no WhatsApp response after deletion. |
| Audit logging | Log every deletion to a permanent audit table with the QR code ID, prefilled message, deletion timestamp, and initiating workflow/user. This record is necessary after deletion since Meta no longer holds the QR code details. |
| Idempotency | A 100 not-found error from Meta when deleting an already-deleted code is safe to treat as success in cleanup workflows — the desired outcome (code does not exist) has been achieved. |
| Error port | Connect the error port but treat 100 not-found errors as idempotent successes in batch cleanup scenarios. |
Examples
Post-Campaign Bulk Cleanup
{
"resource": "qrcode",
"operation": "delete",
"accessToken": "{{ $credentials.whatsAppToken }}",
"phoneNumberId": "123456789012345",
"qrCodeId": "{{ $item.qrCode }}"
}
A post-campaign workflow calls qr-code/getMany to list all codes, then a Function node filters those tagged with the expired campaign ID in the local database. A SplitInBatches node iterates the list and calls this delete node for each. On success: true, each record is marked deleted in the QR code inventory table.
Security Deactivation
{
"resource": "qrcode",
"operation": "delete",
"accessToken": "{{ $credentials.whatsAppToken }}",
"phoneNumberId": "{{ $input.phoneNumberId }}",
"qrCodeId": "{{ $input.compromisedQrCode }}"
}
A security incident triggers an immediate deactivation workflow. The compromised QR code ID is supplied by the security team via an approval form. This node deletes the code at Meta within seconds of the incident being raised. A confirmation notification is sent to the security team with the deletion timestamp and code ID for the incident record.