Zid Integration
Coming Soon
The official Zid plugin is under development. Check the Changelog for release announcements.
Overview
The Zid plugin connects your Zid store to CubeConnect, enabling automated WhatsApp notifications for your customers.
Planned Features
Order Notifications
- Order confirmation messages
- Payment confirmation
- Shipping notifications with tracking links
- Delivery confirmation
Customer Engagement
- Abandoned cart recovery messages
- Post-purchase review requests
- Promotional campaign messages
Support
- Route customer inquiries to conversation flows
- Connect support tickets to live chat
How It Will Work
- Install the CubeConnect app from the Zid App Market
- Connect your CubeConnect account
- Select which WhatsApp templates to use for each event
- Customize message triggers and conditions
Manual Integration
Until the plugin is available, you can integrate Zid with CubeConnect manually:
Step 1: Set Up Zid Webhooks
Configure Zid to send webhooks for order events to your server.
Step 2: Process Webhooks
Create a webhook handler that extracts order data and calls the CubeConnect API:
php
// Example: Handle Zid order webhook
Route::post('/webhooks/zid', function (Request $request) {
$event = $request->header('X-Event-Type');
$data = $request->all();
if ($event === 'order.create') {
$phone = $data['customer']['phone'];
$orderId = $data['order_number'];
$total = $data['total_price'];
Http::withToken(env('CUBECONNECT_API_KEY'))
->post('https://cubeconnect.io/api/v1/messages/send', [
'phone' => $phone,
'message_type' => 'template',
'data' => [
'name' => 'order_confirmation',
'params' => [$orderId, $total . ' SAR'],
],
]);
}
return response('OK', 200);
});Step 3: Create Templates
Create WhatsApp message templates in your CubeConnect dashboard for each notification type.
Requirements
- Active CubeConnect subscription
- Zid store (any plan)
- Approved WhatsApp message templates