eTelecom Zalo Oa Request Consent icon

eTelecom Zalo Oa Request Consent

Request consent via eTelecom Zalo Oa

Overview

This node allows users to request consent from a phone number via the eTelecom Zalo Official Account (OA) platform. It is designed to send a consent request specifying the type of call (audio, video, or both) and the reason for the call. This is useful in scenarios where businesses need explicit permission from customers before initiating calls related to delivery notifications, flight announcements, order confirmations, product consultations, or order updates.

Practical examples:

  • A logistics company requests customer consent before calling about a delivery notification.
  • An airline sends a consent request for flight announcement calls.
  • A service provider asks for permission to consult customers about products or services via audio/video calls.

Properties

Name Meaning
Zalo Official Account Name or ID Select the Zalo Official Account (OA) from which the consent request will be sent. Options are loaded dynamically from your connected accounts. You can also specify an OA ID using an expression.
Phone The phone number of the recipient from whom consent is requested.
Call Type The type of call for which consent is requested. Options: Audio, Video, Audio and Video.
Reason Code The reason for requesting consent. Options include Delivery Notification, Flight Announcement, Order/Appointment Confirmation, Product/Service Consulting, and Update Order.

Output

The node outputs JSON data with the following structure:

  • success: Boolean indicating if the consent request was successfully sent.
  • oa_id: The ID of the Zalo Official Account used.
  • phone: The phone number to which the consent request was sent.
  • call_type: The type of call requested (audio, video, or both).
  • reason_code: The reason code for the consent request.
  • response: The full response object returned by the eTelecom API for the consent request.

If the request fails and "Continue On Fail" is enabled, the output includes:

  • success: false
  • error: Error message describing the failure.

The node does not output binary data.

Dependencies

  • Requires an API key credential to connect to the eTelecom API.
  • The credential must provide:
    • The API domain URL.
    • A valid bearer token for authorization.
  • The node makes HTTP POST requests to the eTelecom API endpoints:
    • /shop.Zalo/ListOA to load available Zalo Official Accounts.
    • /shop.Zalo/RequestConsent to send the consent request.

Troubleshooting

  • No credentials provided: The node requires valid API credentials. Ensure you have configured the required API key credential with the correct domain and token.
  • Invalid response from API: If the API returns unexpected data or errors, verify that the API token is valid and has sufficient permissions.
  • Failed to parse API response: This may indicate a network issue or a change in the API response format. Check connectivity and API documentation.
  • Error fetching Zalo OAs: Occurs when loading the list of Official Accounts fails. Confirm that the API credentials are correct and the account has access to Zalo OAs.
  • Request consent errors: Could be due to invalid phone numbers, unsupported call types, or reason codes. Validate input parameters carefully.

To resolve errors, check the error messages returned in the node output and ensure all inputs and credentials are correctly set.

Links and References

  • n8n Expressions Documentation
  • eTelecom Zalo Official Account API documentation (refer to your API provider's official docs)
  • Zalo Official Account platform overview (for understanding OA concepts)

Discussion