Single Product List

The structure presented is as follows:

function ListProduct(number, headerText, footerText, catalogId, productRetailerId){
    const data = JSON.stringify({
        "messaging_product": "whatsapp",
        "recipient_type": "individual",
        "to": number,
        "type": "interactive",
        "interactive": {
            "type": "product",
            "body": {
                "text": headerText
            },
            "footer": {
                "text": footerText
            },
            "action": {
                "catalog_id": catalogId,
                "product_retailer_id": productRetailerId
            }
        }
    });
    return data;
}

The parameters received are a number, headerText, footerText, catalogId and productRetailerId.

We recommend sending in the following way in the process files:

Later in whatsappModels we can configure it:

This way you will be able to display 1 product at a time as requested by the user.

Última actualización