Zalo ZNS icon

Zalo ZNS

Zalo Notification Service (ZNS) API

ZNS Message → Send Message with Hash Phone

AI-generated

Overview

This node integrates with the Zalo Notification Service (ZNS) API to send ZNS messages using a hashed phone number. It is useful for sending templated notifications to users on the Zalo platform where the phone number is hashed for privacy. For example, businesses can send order confirmations, OTPs, or promotional messages using predefined ZNS templates by providing the template ID, template data, and the hashed phone number.

Use Case Examples

  1. Sending an order confirmation message to a customer using a ZNS template and the customer's hashed phone number.
  2. Sending an OTP message to a user with a hashed phone number for secure verification.

Properties

Name Meaning
Phone Hash The hashed phone number to which the ZNS message will be sent.
Template ID The ID of the ZNS template to use for the message.
Template Data JSON data to replace placeholders in the ZNS template. The parameter names must match those registered in the template. Use {} if the template has no parameters.
Tracking ID Optional ID to track the message.

Output

JSON

  • json - The JSON response from the Zalo ZNS API after sending the message, including status and message details.

Dependencies

  • Zalo OA API Credential for authentication with the Zalo Notification Service API

Troubleshooting

  • Common issues include invalid or missing credentials, incorrect template ID, or malformed template data JSON. The node throws errors with messages indicating the problem, such as 'Unknown operation' if the operation is not supported, or API errors returned from Zalo.
  • To resolve errors, ensure the Zalo OA API credential is correctly configured, the template ID exists and is active, and the template data JSON matches the template parameters.

Links

Discussion