🔔 Notifications / Hooks
Overview
Notifications and hooks provide partners with the ability to receive real-time updates about different stages of the transaction process. These mechanisms are crucial for enabling automated actions based on specific events, such as the creation of a session, the completion of a transaction, and various voucher-related actions. Implementing these hooks is optional but can greatly enhance the responsiveness and efficiency of a partner's operations and can either be blocking OR non blocking regarding the flow.
Types of Hooks
Partners can choose to implement any or all of the following hooks based on their operational needs and preferences:
1. Create Session Hook
Trigger Event: Initiated when a new session is created.
Purpose: Allows partners to track the initiation of new sessions and can be used for logging, monitoring, or initiating preliminary processes that are necessary for a new session.
Usage Example: Partners may use this hook to allocate resources or trigger specific workflows tailored to the needs of each session.
2. Transaction Completion Hook
Trigger Event: Triggered when the entire trade-in process is completed.
Purpose: Enables partners to receive notifications upon the successful completion of a transaction, facilitating post-transaction activities such as generating reports, updating inventory, or customer notifications.
Usage Example: This hook is particularly useful for financial reconciliations and for triggering customer satisfaction surveys or follow-up actions.
3. Voucher Management Hooks
These hooks are involved in various voucher-related activities, providing flexibility in managing promotions and offers.
- Create Voucher Hook
- Trigger Event: When a new voucher is created.
- Purpose: Notifies partners when a new voucher is issued, which can be used to adjust marketing strategies or analyze promotional effectiveness.
- Redeem Voucher Hook
- Trigger Event: When a voucher is redeemed.
- Purpose: Allows partners to track the redemption of vouchers, useful for managing inventory and understanding consumer behavior.
- Cancel Voucher Hook
- Trigger Event: When a voucher is canceled.
- Purpose: Provides updates on voucher cancellations, aiding in maintaining accurate records and adjusting financial forecasts.
Implementation Considerations
While implementing these hooks:
- Ensure secure data transmission by using HTTPS.
- Validate incoming data to prevent unauthorized access or data corruption.
- Provide clear, actionable responses from your system to ensure that the hooks operate effectively.
Benefits of Using Hooks
- Automated Workflows: Automate responses to events, reducing manual work and increasing efficiency.
- Real-time Data: Gain real-time insights into operations, enhancing decision-making and operational agility.
- Enhanced Customer Experience: Quickly adapt to customer interactions and improve overall customer satisfaction.
Conclusion
Implementing notifications and hooks is optional but highly recommended for partners who wish to leverage real-time data and automation to optimize their operations and customer interactions.