Coupon Code - Captain
AI-generatedOverview
This node interacts with a voucher system to retrieve voucher codes for users based on a selected coupon pool. It is useful in scenarios where you want to assign or fetch vouchers for users in bulk, such as in marketing campaigns or loyalty programs. For example, you can select a coupon pool and provide a list of users to get their corresponding vouchers from that pool.
Use Case Examples
- A marketing automation workflow where users from a previous node are assigned vouchers from a specific coupon pool.
- A loyalty program system where you fetch voucher codes for a batch of users to send personalized discounts.
Properties
| Name | Meaning |
|---|---|
| Coupon Pool Name | The name of the voucher pool from which to retrieve vouchers. This is selected from a dynamically loaded list of available voucher pools. |
| Users | A string input representing users. If left blank, the node uses users from the previous node's output. |
Output
JSON
- ``
voucherCode- The voucher code assigned to each user from the selected voucher pool.userId- The user ID for whom the voucher code is retrieved.
Dependencies
- Requires environment variables CDP_URL (base URL for API) and UNEXO_API_KEY (API authentication token).
- Makes HTTP requests to external APIs to fetch voucher pool names and voucher codes.
Troubleshooting
- Common issues include API request failures due to network problems or invalid API keys, resulting in error messages indicating failed attempts.
- If the 'Users' input is left blank and the previous node does not provide user data, the node may fail to retrieve vouchers.
- Ensure environment variables CDP_URL and UNEXO_API_KEY are correctly set and valid.