For businesses operating across Vietnam and APAC, Zalo Official Account (OA) is the primary customer support channel, yet managing Zalo OA Manager separately from Perfex CRM fragments lead tracking and ticket history. Manual copy-pasting slows response SLAs across sales and finance teams.
PolyUtilities v3.7.0 connects Zalo OA API v3 directly to Perfex CRM Unified Inbox via Poly_omnichat_zalo_adapter, validating every inbound event with SHA256 X-ZEvent-Signature and sending outbound customer service replies through openapi.zalo.me/v3.0/oa/message/cs.
Before configuring Zalo webhooks, confirm OmniChat is enabled under the Guide to Install and Use PolyUtilities for Perfex CRM.
| Zalo OA Credential | Where to Find in Zalo Portals | Usage in PolyUtilities |
|---|---|---|
| Account ID (OA ID) | Zalo OA Manager (oa.zalo.me/manage) | Matches inbound oa_id webhook payloads to the right channel |
| Token / API Key | OA Access Token via Zalo OAuth v4 / API Explorer | Sent as access_token header to Zalo OA v3.0 CS endpoint |
| App Secret / Webhook Secret | Zalo for Developers > App > Webhook > OA Secret Key | Computes SHA256 X-ZEvent-Signature MAC verification |
| Webhook URL | https://your-crm-domain.com/poly_utilities/omnichat/webhook/zalo | Ingests user_send_text, image, audio, and file events |
1. Register Your Zalo App, Link OA, and Save Credentials FIRST
Zalo verifies webhook payloads by signing app_id + raw_body + timestamp + oa_secret_key with SHA256 and transmitting mac=... inside the X-ZEvent-Signature header. Because Zalo checks endpoint reachability when you toggle webhook events on, always store your OA credentials inside Perfex CRM first.
- Create a verified Zalo Official Account at Zalo OA Manager and register an application inside Zalo for Developers.
- Link your OA under App > Official Account Management, grant messaging permissions, and generate an OA Access Token via OAuth v4 or API Explorer.
- In Perfex CRM > OmniChat Settings > Channels, select Zalo OA, paste your OA ID, OA Access Token, and OA Secret Key (plus App ID), then click Save Channel.
- In Zalo Developers > Webhook, paste
poly_utilities/omnichat/webhook/zalo, verify domain ownership if prompted, and toggle ONuser_send_text,user_send_image,user_send_audio, anduser_send_file.
2. Unify Customer Support With AI Copilot and Multi-Channel Workflows
Once verified, inbound Zalo messages and attachments from .zdn.vn and .zaloapp.com enter Unified Inbox alongside channels such as Slack Events API and Twilio SMS. Agents can draft Vietnamese or English replies with AI Copilot, tag invoices or tickets using CrossTag, or convert threads into Perfex records in one click.
- Verify your Zalo OA (verified business badge / upgraded CSKH plan) so outbound
/v3.0/oa/message/cscalls carry full customer-service quota. - Pair Automation Rules with Business Hours to trigger AI Auto-Reply or assign local support staff when Zalo inquiries arrive after hours.
- Keep Auto-Download Inbound Media enabled so Zalo user photos and voice attachments are archived securely under Perfex storage.
Common Pitfalls and Quick Fixes
- Webhook fails with HTTP 403 Invalid signature: Confirm both the Zalo App ID and OA Secret Key are saved accurately, because Zalo’s SHA256 MAC calculation hashes
app_id + raw_body + timestamp + oa_secret_key. - Outbound CSKH reply returns permission error: Ensure your OA holds an active verified package supporting OA API v3 Customer Service Messaging.
- OA Access Token expires unexpectedly: Refresh the OAuth v4 OA token and update the channel credential before active conversations stall.
Frequently Asked Questions
Which Zalo OA webhook events does PolyUtilities process?
Poly_omnichat_zalo_adapter processes all inbound customer messaging events prefixed with user_send_, including user_send_text, user_send_image, user_send_audio, and user_send_file. Attachment URLs from verified .zdn.vn and .zaloapp.com CDNs are downloaded locally through SSRF-safe host allowlists and 10-layer file checks.
How is X-ZEvent-Signature verified on incoming Zalo webhooks?
PolyUtilities extracts the webhook timestamp from the incoming JSON body, concatenates app_id + raw_body + timestamp + oa_secret_key, computes the SHA256 digest prefixed with mac=, and compares it against the X-ZEvent-Signature header using timing-safe hash_equals() before storing events.
Does Zalo OA API v3 require a verified Official Account?
Yes. Zalo restricts outbound Customer Service Messaging (openapi.zalo.me/v3.0/oa/message/cs) quotas to verified Zalo Official Accounts on eligible business plans. Inbound webhooks can be tested on developer accounts, while full production CSKH replies require active official Zalo OA business verification.
Can AI Copilot draft and translate Zalo replies in Vietnamese and English?
Yes. PolyUtilities provides full native Vietnamese and English i18n parity plus AI Draft, Rewrite, and Custom AI Translate modals directly inside Unified Inbox, allowing support agents to read customer Zalo threads and dispatch polished replies in either language effortlessly inside Perfex CRM.

Leave a Reply