【问题标题】:Send Commerce Manager catalog product using WhatsApp Cloud API使用 WhatsApp Cloud API 发送 Commerce Manager 目录产品
【发布时间】:2022-12-29 05:08:07
【问题描述】:

将我的目录从 Commerce manager 成功添加到 Whatsapp manager 后,现在我想通过 WhatsApp 云 API 向用户发送此产品,我看到了与 on-permises API 相关的链接,但没有找到运气。

https://developers.facebook.com/docs/whatsapp/guides/commerce-guides/share-products-with-customers

到目前为止我的请求正文代码:

https://graph.facebook.com/v13.0/{{Phone-Number-ID}}/messages

{
"interactive": {
    "messaging_product": "whatsapp",
    "to": "9***********",
    "type": "product",
    "body": {
      "text": "text-body-content"
    },
    "footer": {
      "text": "text-footer-content"
    },
    "action": {
      "catalog_id": "11111111111111",
      "product_retailer_id": "2222"
    }
  }
}

错误:

 {
    "error": {
        "message": "(#100) The parameter messaging_product is required.",
        "type": "OAuthException",
        "code": 100,
        "fbtrace_id": "AZ-AFvM-Nsnm62de34st5mMJxzJ"
    }
}

另一个请求

{ 
    "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to" : "**********",
  "type": "interactive",
  "interactive": {
    "type": "product",
    "body": {
      "text": "body text"
    },
    "footer": {
      "text": "footer text"
    },
    "action": {
      "catalog_id": "1968701893374783",
      "product_retailer_id": "5493"
    }
  }
}

Result: {
    "error": {
        "message": "(#131009) Parameter value is not valid",
        "type": "OAuthException",
        "code": 131009,
        "error_data": {
            "messaging_product": "whatsapp",
            "details": "Interactive Message type,  'product' not supported. Supported types ['button', 'list']"
        },
        "error_subcode": 2494010,
        "fbtrace_id": "AntQdhmCkgZ0Xtaz643Bgq"
    }
}

【问题讨论】:

    标签: whatsapp


    【解决方案1】:

    更新:

    它是supporting from Aug 25, 2022

    您现在可以在发送给客户的消息中包含产品和服务,客户无需离开聊天线程即可将它们添加到购物车中。请参阅销售产品和服务指南,了解如何向客户发送单一和多产品消息。


    Cloud API中不支持productproduct_list类型,但可以在On-Premises API中使用,

    可能还在开发中, 您可以跟踪 Facebook 社区中的对话,

    【讨论】:

    • 当我使用 WhatsApp 云 API 发送我的产品时(已经在商务管理器中设置产品并将其附加到 WhatsApp 管理器),您是否经历过它仅在 Web.Whatsapp 上可见,而消息未显示在移动 WhatsApp 应用程序中?
    • 我还没有实施它,但我在 Facebook 开发者论坛上看到了同样的问题,我建议你在那里跟踪同样的问题。
    【解决方案2】:
    data = {
        "messaging_product": "whatsapp",
        "to": m_id,
        "type": "interactive",
        "interactive":
    
            {
                "type": "product_list",
                "header": {
                    "type": "text",
                    "text": "header text"
                },
                "body": {
                    "text": "body text"
                },
                "footer": {
                    "text": "footer text"
                },
                "action": {
                    "catalog_id": "catalog id",
                    "sections": [
                        {
                            "title": "section title",
                            "product_items": [
                                {"product_retailer_id": "product id"},
                            ]},
                        {
                            "title": "section title",
                            "product_items": [
                                {"product_retailer_id": "product id"},
                             
                            ]},
                    ]
    
                },
            }
    
    
                 }
    

    【讨论】:

      猜你喜欢
      • 2021-08-16
      • 2022-06-14
      • 2022-10-07
      • 2022-06-21
      • 1970-01-01
      • 2021-04-16
      • 2022-07-13
      • 2017-02-09
      • 2012-09-29
      相关资源
      最近更新 更多