Webhooks Settings
The Webhooks feature in Tracepos allows business owners to integrate their system with external applications by sending real-time data updates when specific events occur. This guide explains how to use the Webhooks Settings page to configure and manage webhooks effectively.
Accessing the Webhooks Settings Page
- Navigate to the Settings module in the Tracepos dashboard.
- Select Webhooks from the settings submenu to access the webhook management page.
Overview of Features
1. View Webhooks
- Purpose: See a list of all configured webhooks in the system.
- Details Displayed:
- Webhook Name: The name of the webhook.
- Event: The event that triggers the webhook (e.g., Sales Created, Stock Adjusted).
- URL: The endpoint where the webhook sends data.
- Status: Indicates whether the webhook is active or inactive.
- Actions: Options to edit or delete the webhook.
2. Add a New Webhook
- Purpose: Create a new webhook to send data to an external application when specific events occur.
- Steps:
- Click the + Add Webhook button at the top of the page.
- Fill in the required details in the Add/Edit Webhook form:
- Webhook Name:
- Enter a descriptive name for the webhook (e.g., "Sales Notification").
- Event:
- Select the event that will trigger the webhook (e.g., Sales Created, Stock Adjusted).
- URL:
- Enter the endpoint URL where the webhook will send data.
- Headers:
- Add any custom headers required by the external application (e.g., Authorization tokens).
- Payload:
- Define the data structure to be sent in the webhook request (e.g., JSON format).
- Status:
- Set the webhook as Active or Inactive.
3. Edit an Existing Webhook
- Purpose: Update the details of a previously configured webhook.
- Steps:
- Locate the webhook you want to edit in the list.
- Click the Edit button next to the webhook.
- Modify the necessary fields in the form:
- Update the webhook name, event, URL, headers, payload, or status.
4. Delete a Webhook
- Purpose: Remove a webhook that is no longer needed.
- Steps:
- Select one or more webhooks using the checkboxes in the list.
- Click the Delete button.
- Confirm the deletion in the popup dialog.
How to Use the Add/Edit Webhook Form
The Add/Edit Webhook form is where you input the details for a new webhook or update an existing one. Here's how to use it:
Fields in the Form
- Webhook Name:
- Enter a descriptive name for the webhook (e.g., "Sales Notification").
- This is a required field.
- Select the event that will trigger the webhook (e.g., Sales Created, Stock Adjusted).
- Enter the endpoint URL where the webhook will send data.
- Ensure the URL is valid and accessible.
- Add any custom headers required by the external application (e.g., Authorization tokens).
- Define the data structure to be sent in the webhook request (e.g., JSON format).
- Set the webhook as Active or Inactive.
Buttons in the Form
- Save:
- Click this button to save the new webhook or update an existing one.
- Click this button to close the form without saving changes.
Key Features of the Webhooks Settings Page
- Webhook List:
- Displays all configured webhooks with their details.
- Allows sorting and filtering for easy navigation.
- A modal-based form for adding or editing webhook details.
- Includes validation for required fields.
- + Add Webhook: Opens the Add Webhook form.
- Edit: Opens the Edit Webhook form for the selected webhook.
- Delete: Removes selected webhooks from the system.
- Only users with the appropriate permissions can add, edit, or delete webhooks.
Tips for Business Owners
- Use Descriptive Names:
- Give your webhooks clear and descriptive names to avoid confusion (e.g., "Inventory Update Notification").
- Test Webhooks:
- Test the webhook configuration to ensure data is sent correctly to the external application.
- Keep Webhooks Secure:
- Use secure URLs (HTTPS) and include authentication headers to protect your data.
Permissions
- Add Webhooks: Requires webhooks_create permission.
- Edit Webhooks: Requires webhooks_edit permission.
- Delete Webhooks: Requires webhooks_delete permission.
Troubleshooting
- Webhook Not Triggering:
- Ensure the event associated with the webhook is occurring in the system.
- Verify that the webhook is set to Active.
- Check the endpoint URL for accuracy and accessibility.
- Ensure the payload format matches the requirements of the external application.
- Refresh the page and try again. Ensure you have the necessary permissions to edit webhooks.
By using the Webhooks feature, you can seamlessly integrate TracePOS with external applications, enabling real-time data sharing and automation. Let us know if you need further assistance!