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.
"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.