@@ -257,7 +257,7 @@ $whatsapp_cloud_api->sendCtaUrl(
257257
258258$body = 'Hello! Thanks for your interest. Ordering is easy. Just visit our catalog and add items you\'d like to purchase.';
259259$footer = 'Best grocery deals on WhatsApp!';
260- $sku_thumbnail = '<product-sku-id >'; // product sku id to use as header thumbnail
260+ $sku_thumbnail = '<product-sku-id >'; // product sku id to use as header thumbnail
261261
262262$whatsapp_cloud_api->sendCatalog(
263263 '<destination-phone-number >',
@@ -297,6 +297,67 @@ $whatsapp_cloud_api->sendButton(
297297);
298298```
299299
300+ ### Send Multi Product Message
301+ ``` php
302+ <?php
303+
304+ use Netflie\WhatsAppCloudApi\WhatsAppCloudApi;
305+ use Netflie\WhatsAppCloudApi\Message\MultiProduct\Row;
306+ use Netflie\WhatsAppCloudApi\Message\MultiProduct\Section;
307+ use Netflie\WhatsAppCloudApi\Message\MultiProduct\Action;
308+
309+ $rows_section_1 = [
310+ new Row('<product-sku-id >'),
311+ new Row('<product-sku-id >'),
312+ // etc
313+ ];
314+
315+ $rows_section_2 = [
316+ new Row('<product-sku-id >'),
317+ new Row('<product-sku-id >'),
318+ new Row('<product-sku-id >'),
319+ // etc
320+ ];
321+
322+ $sections = [
323+ new Section('Section 1', $rows_section_1),
324+ new Section('Section 2', $rows_section_2),
325+ ];
326+
327+ $action = new Action($sections);
328+ $catalog_id = '<catalog-id >';
329+ $header = 'Grocery Collections';
330+ $body = 'Hello! Thanks for your interest. Here\'s what we can offer you under our grocery collection. Thank you for shopping with us.';
331+ $footer = 'Subject to T&C';
332+
333+ $whatsapp_cloud_api->sendMultiProduct(
334+ '<destination-phone-number >',
335+ $catalog_id,
336+ $action,
337+ $header,
338+ $body,
339+ $footer // optional
340+ );
341+ ```
342+
343+ ### Send Single Product Message
344+ ``` php
345+ <?php
346+
347+ $catalog_id = '<catalog-id >';
348+ $sku_id = '<product-sku-id >';
349+ $body = 'Hello! Here\'s your requested product. Thanks for shopping with us.';
350+ $footer = 'Subject to T&C';
351+
352+ $whatsapp_cloud_api->sendSingleProduct(
353+ '<destination-phone-number >',
354+ $catalog_id,
355+ $sku_id,
356+ $body, // body: optional
357+ $footer // footer: optional
358+ );
359+ ```
360+
300361### Replying messages
301362
302363You can reply a previous sent message:
@@ -458,6 +519,8 @@ Fields list: https://developers.facebook.com/docs/whatsapp/cloud-api/reference/b
458519- Send Contacts
459520- Send Lists
460521- Send Buttons
522+ - Send Multi Product Message
523+ - Send Single Product
461524- Upload media resources to WhatsApp servers
462525- Download media resources from WhatsApp servers
463526- Mark messages as read
0 commit comments