RETM | REST API
  1. Customer webhook
RETM | REST API
  • Developer guide
  • New to our DevPortal 🤔
  • Authentication
    • Token
      POST
  • Webhook
    • Overview
    • Invoice Webhooks
      • Webhook Events
      • Invoice Created
    • Orders Webhooks
      • Webhook Events
      • Order Triggeres
    • Menu Webhooks
      • Menu Updates
      • Menu Changed
    • Loyalty Webhooks
      • Promotional Coupon
      • Check Reward
      • Redeem Reward
    • Customer webhook
      • Customer Data
      • Customer hook
        POST
    • Error webhook
      • Stay Alert to Connectivity Issues
      • Error webhook
  • Orders
    • Orders
      GET
    • Create Order
      POST
    • Cancel Order
      POST
    • Update delivery order status
      POST
  • Menu
    • Categories
      • List Categories
      • Single Categoy
    • Products
      • Products
      • Single Product
      • Simple List
    • Menu
      GET
  • Branches
    • Branches
      GET
  • Devices
    • Devices
      GET
  • Order type
    • Order types
      GET
    • Create order type
      POST
  • Price Lists
    • Price Lists
  • Payment Methods
    • Payment methods
    • Create pay method
  • Order Charges
    • order charges
    • Create order charges
  • Taxes
    • Tax list
    • Create tax
  • Customers
    • Customers
  1. Customer webhook

Customer Data

Stay in Sync with Customer Data: Utilizing the Customer Webhook#

Maintain a consistent view of customer information within your integration by leveraging the customer webhook provided by RETM.

Trigger:#

A new customer is added, an existing customer's information is updated, or a customer is deleted within the RETM system.

Notification:#

RETM sends a POST request to your designated notification URL, containing the following details in JSON format:
{
    "business_refrence": "", // The unique identifier of the restaurant associated with the customer change.
    "timestamp": "0001-01-01T00:00:00", // The exact time (in UTC) when the customer event occurred.
    "event": "customer.created | customer.updated | customer.deleted", // Indicates the specific event type.
    "reference": "f70a1df4-3161-4d91-92ca-dbd4a079ac80", // the response returend by you if your hook save the response
    "customer": { // An object containing information about the customer
        "id": 1234, // The customer's unique identifier within RETM.
        "name": "Ahmad Abdullah", // The customer's name in English.
        "name_localized": "احمد عبدالله", //The customer's name in Arabic (if applicable).
        "phone": "055123456", //The customer's phone number.
        "email": "ahmed@abdullah.com" // The customer's email address.
    }
}

Integration Response:#

Prompt Action: Upon receiving the webhook notification, your integration should immediately:
Update its internal customer records to reflect the changes.
Trigger any relevant actions or workflows based on the event type (e.g., sending a welcome email for new customers).

Advantages:#

Real-Time Updates: Stay informed about customer data changes as they happen, ensuring a consistent and up-to-date view across your integration.
Optimized Customer Experiences: Personalize interactions and provide relevant information based on the latest customer data.
Enhanced Marketing and Communication: Leverage accurate customer data for targeted campaigns and communications.

Best Practices:#

Secure Notification URL: Enforce HTTPS to safeguard sensitive customer information.
Prompt Response: Acknowledge receipt of the webhook notification with a 2xx HTTP status code within 10 seconds to avoid delivery retries.
Robust Error Handling: Implement mechanisms to gracefully handle potential errors during notification processing.
Data Integrity: Validate and sanitize customer data before integrating it into your systems to prevent security vulnerabilities.
Logging: Maintain detailed logs of webhook events for troubleshooting and auditing purposes.
By effectively utilizing the customer webhook, you'll ensure a seamless flow of customer data between RETM and your integration, enabling a more personalized and efficient customer experience.
Modified at 2024-12-09 11:25:41
Previous
Redeem Reward
Next
Customer hook
Built with