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

  1. Navigate to the Settings module in the Tracepos dashboard.
  2. 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:
  1. Click the + Add Webhook button at the top of the page.
  2. 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.
Click Save to add the webhook to the system.

3. Edit an Existing Webhook

  • Purpose: Update the details of a previously configured webhook.
  • Steps:
  1. Locate the webhook you want to edit in the list.
  2. Click the Edit button next to the webhook.
  3. Modify the necessary fields in the form:
  • Update the webhook name, event, URL, headers, payload, or status.
Click Update to save the changes.

4. Delete a Webhook

  • Purpose: Remove a webhook that is no longer needed.
  • Steps:
  1. Select one or more webhooks using the checkboxes in the list.
  2. Click the Delete button.
  3. 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

  1. Webhook Name:
  • Enter a descriptive name for the webhook (e.g., "Sales Notification").
  • This is a required field.
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.
  • Ensure the URL is valid and accessible.
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.

Buttons in the Form

  1. Save:
  • Click this button to save the new webhook or update an existing one.
Cancel:
  • Click this button to close the form without saving changes.

Key Features of the Webhooks Settings Page

  1. Webhook List:
  • Displays all configured webhooks with their details.
  • Allows sorting and filtering for easy navigation.
Add/Edit Form:
  • A modal-based form for adding or editing webhook details.
  • Includes validation for required fields.
Action Buttons:
  • + Add Webhook: Opens the Add Webhook form.
  • Edit: Opens the Edit Webhook form for the selected webhook.
  • Delete: Removes selected webhooks from the system.
Permissions-Based Access:
  • 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

  1. Webhook Not Triggering:
  • Ensure the event associated with the webhook is occurring in the system.
  • Verify that the webhook is set to Active.
Data Not Received:
  • Check the endpoint URL for accuracy and accessibility.
  • Ensure the payload format matches the requirements of the external application.
Changes Not Saved:
  • 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!

 

Article Details

Article ID:
65
Category:
Rating :

Related articles