تذكير السلات المتروكة في سلة على واتساب
عندما يترك عميل سلته في سلة، تصله رسالة واتساب لطيفة برابط يعيده إلى السلة.
كيف تعمل
المشغّل: Webhook — حدث سلة متروكة من سلة
- استقبل حدث السلة المتروكة من سلة.
- احتفظ بالسلات التي فيها رقم جوال ورابط إتمام الطلب.
- أرسل قالب واتساب معتمدًا باسم العميل والإجمالي ورابط السلة.
- سجّل التذكير في جدول لتعرف كم سلة رجعت.
المخطط
مشغّل تطبيق منطق كود
الكود
كود JavaScript المستخدم في خطوات Code، وهو مضمَّن بالفعل في القالب بالأسفل.
// Mode: Run Once for Each Item
// Salla abandoned.cart webhook → clean fields for the WhatsApp reminder.
// Run one test cart first and check the field names in the webhook data.
const o = $json.body?.data || {};
const c = o.customer || {};
return {
json: {
cart_id: o.id,
name: c.name || [c.first_name, c.last_name].filter(Boolean).join(" "),
phone: `${c.mobile_code || ""}${c.mobile || ""}`.replace(/[^0-9]/g, ""),
total: `${o.total?.amount ?? ""} ${o.total?.currency ?? ""}`.trim(),
url: o.checkout_url || "",
},
};ابنِها بأداتك
اختر أداتك — نفس الأتمتة، خطوة بخطوة.
انسخه والصقه مباشرة في مساحة عمل n8n (Ctrl+V)، أو حمّله واستخدم Import from File. بعد ذلك اربط حساباتك واستبدل كل قيمة تبدأ بـ YOUR_.
عرض الكود (209 سطر)
{
"name": "تذكير السلات المتروكة في سلة على واتساب (Flowngn)",
"nodes": [
{
"parameters": {
"content": "## تذكير السلات المتروكة في سلة على واتساب\nعندما يترك عميل سلته في سلة، تصله رسالة واتساب لطيفة برابط يعيده إلى السلة.\n\n**Setup**\n1. Open each node and connect your own credentials.\n2. Replace every YOUR_… placeholder.\n3. Test once, then activate.\n\nFree template from Flowngn",
"height": 260,
"width": 340
},
"id": "4582ffa0-b14a-4d3f-a4ae-9194c18933a0",
"name": "Setup notes",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-420,
-60
]
},
{
"parameters": {
"httpMethod": "POST",
"path": "salla-abandoned-cart",
"options": {}
},
"id": "4582ffa0-b14a-4d3f-a4ae-9194c18933a0",
"name": "Salla abandoned cart",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
0,
0
],
"webhookId": "4582ffa0-b14a-4d3f-a4ae-9194c18933a0"
},
{
"parameters": {
"jsCode": "// Mode: Run Once for Each Item\n// Salla abandoned.cart webhook → clean fields for the WhatsApp reminder.\n// Run one test cart first and check the field names in the webhook data.\nconst o = $json.body?.data || {};\nconst c = o.customer || {};\n\nreturn {\n json: {\n cart_id: o.id,\n name: c.name || [c.first_name, c.last_name].filter(Boolean).join(\" \"),\n phone: `${c.mobile_code || \"\"}${c.mobile || \"\"}`.replace(/[^0-9]/g, \"\"),\n total: `${o.total?.amount ?? \"\"} ${o.total?.currency ?? \"\"}`.trim(),\n url: o.checkout_url || \"\",\n },\n};",
"mode": "runOnceForEachItem"
},
"id": "4582ffa0-b14a-4d3f-a4ae-9194c18933a0",
"name": "Read cart",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
300,
0
]
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "loose"
},
"conditions": [
{
"id": "c1",
"leftValue": "={{ $json.phone.length >= 10 && $json.url !== '' }}",
"rightValue": "",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
}
}
],
"combinator": "and"
},
"options": {}
},
"id": "4582ffa0-b14a-4d3f-a4ae-9194c18933a0",
"name": "Has phone and link?",
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
600,
0
]
},
{
"parameters": {
"operation": "sendTemplate",
"phoneNumberId": "YOUR_PHONE_NUMBER_ID",
"recipientPhoneNumber": "={{ $json.phone }}",
"template": "YOUR_CART_REMINDER_TEMPLATE|ar",
"components": {
"component": [
{
"type": "body",
"bodyParameters": {
"parameter": [
{
"type": "text",
"text": "={{ $json.name || 'عميلنا العزيز' }}"
},
{
"type": "text",
"text": "={{ $json.total }}"
},
{
"type": "text",
"text": "={{ $json.url }}"
}
]
}
}
]
}
},
"id": "4582ffa0-b14a-4d3f-a4ae-9194c18933a0",
"name": "Send cart reminder",
"type": "n8n-nodes-base.whatsApp",
"typeVersion": 1,
"position": [
900,
0
]
},
{
"parameters": {
"operation": "append",
"documentId": {
"__rl": true,
"value": "YOUR_SPREADSHEET_ID",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "Cart reminders",
"mode": "name"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"date": "={{ $now.toISO() }}",
"cart_id": "={{ $('Read cart').item.json.cart_id }}",
"phone": "={{ $('Read cart').item.json.phone }}",
"total": "={{ $('Read cart').item.json.total }}"
}
},
"options": {}
},
"id": "4582ffa0-b14a-4d3f-a4ae-9194c18933a0",
"name": "Log reminder",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.5,
"position": [
1200,
0
]
}
],
"connections": {
"Salla abandoned cart": {
"main": [
[
{
"node": "Read cart",
"type": "main",
"index": 0
}
]
]
},
"Read cart": {
"main": [
[
{
"node": "Has phone and link?",
"type": "main",
"index": 0
}
]
]
},
"Has phone and link?": {
"main": [
[
{
"node": "Send cart reminder",
"type": "main",
"index": 0
}
]
]
},
"Send cart reminder": {
"main": [
[
{
"node": "Log reminder",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"meta": {
"templateCredsSetupCompleted": false
},
"tags": []
}في Make، أنشئ سيناريو جديدًا وأضف هذه الوحدات بالترتيب:
- Webhooks › Custom webhook
- Tools › Set variable / Iterator + Array aggregator (same logic as the Code step)
- Filter on the next route: “Has phone and link?”
- إذا نعمWhatsApp Business Cloud › Send a Template Message
- إذا نعمGoogle Sheets › Add a Row
- كل تشغيل لوحدة يستهلك عمليات (operations) في Make — والباقة المجانية تتضمن حصة شهرية.
- دوال Make المدمجة (map و sum و formatDate…) تغني عن معظم خطوات Code؛ وللمنطق المعقد استخدم وحدة كود.
- قد تختلف أسماء الوحدات والخطوات قليلًا مع تحديث Make و Zapier لتطبيقاتهما.
في Zapier، أنشئ Zap جديدًا وأضف هذه الخطوات بالترتيب:
- Webhooks by Zapier — Catch Hook
- Code by Zapier — Run JavaScript (paste the code from the Code section)
- Filter by Zapier: “Has phone and link?”
- إذا نعمWhatsApp — Send Template Message
- إذا نعمGoogle Sheets — Create Spreadsheet Row
- الـ Zaps التي فيها أكثر من خطوتين تحتاج باقة Zapier مدفوعة.
- الـ Webhooks والفلاتر/المسارات و Code by Zapier ميزات مدفوعة في بعض باقات Zapier.
- Code by Zapier يشغّل JavaScript: أعد استخدام الكود بالأعلى، مع قراءة المدخلات من inputData بدلًا من $json.
- قد تختلف أسماء الوحدات والخطوات قليلًا مع تحديث Make و Zapier لتطبيقاتهما.
نصائح
- راسل فقط العملاء الذين وافقوا على رسائل واتساب.
- سلة قد ترسل تذكير SMS خاصًا بها؛ أوقف أحدهما حتى لا يصل العميل تذكيران.
أتمتات مشابهة
تطبيقات المنطقةمتوسط
تأكيد طلبات سلة على واتساب
عملاء متجرك على سلة تصلهم رسالة واتساب لحظة الطلب.
Salla → WhatsApp6 س/شهر
تطبيقات المنطقةسهل
طلبات سلة في Google Sheets
كل طلب جديد في سلة يُسجَّل في جدول للتجهيز والتقارير.
Salla → Google Sheets4 س/شهر
تطبيقات المنطقةمتوسط
تأكيد طلبات الدفع عند الاستلام على واتساب
اطلب من عملاء الدفع عند الاستلام تأكيد الطلب على واتساب قبل الشحن — طلبات وهمية أقل.
Salla → WhatsApp8 س/شهر