Functionality
1. Handling Incoming Requests
- The handler listens for incoming webhook notifications from Pendo.
- It processes
POST requests containing feedback data from Pendo’s platform and verifies that the data is valid.
2. Verifying Request Authenticity
- For security, the handler can verify that the incoming request is indeed from Pendo by checking a unique signature included in the request headers.
- If the signature is valid, the handler processes the data. If not, it rejects the request.
3. Event Filtering
- The handler is set up to only process two types of events from Pendo:
pollSubmitted and npsSubmitted.
- Any other event types received are ignored, ensuring the handler only processes relevant data.
4. Logging Data
- The handler saves incoming feedback data in text files, organized by date and time. This helps track and review past feedback submissions easily.
- These logs are stored in a specific folder on the server, ensuring the data is kept safe and organized.
5. Sending Email Notifications
- When feedback is submitted, the handler can send an email summary of the feedback to specified recipients.
- The email includes key details, such as who submitted the feedback, what feedback they provided, and which survey or poll it was related to.
- This feature allows teams to quickly receive and act on user feedback.
6. Error Handling
- If something goes wrong while processing a request, the handler sends back an error message with a clear explanation.
- Common errors include missing or incorrect signatures or problems with the configuration settings.
\