Twilio 对话和目录内容模板

问题描述 投票:0回答:1

我正在尝试从 Twilio Studio Flow 发送目录模板,其中对话在触发器侧被激活。但是,我不断收到以下错误:

Failure sending message: Unsupported Content Template Type.

是否有任何解决方法可以在此配置中成功发送目录模板?由于 Flex 集成,我正在使用 Conversations。

编辑: 添加一个最小的可重现示例。

1.创建内容模板

{
    "friendly_name": "simple_catalog",
    "language": "es",
    "types": {
        "twilio/catalog": {
            "id": "XXXXXX", // Replace with your catalog ID
            "body": "Select.",
            "subtitle": "Subtitle",
            "title": "Products",
            "thumbnail_item_id": "id_1" // Replace with your thumbnail ID
        }
    }
}

2.创建工作室流程:

{
  "description": "A New Flow",
  "states": [
    {
      "name": "Trigger",
      "type": "trigger",
      "transitions": [
        {
          "event": "incomingMessage"
        },
        {
          "event": "incomingCall"
        },
        {
          "next": "send_catalog",
          "event": "incomingConversationMessage"
        },
        {
          "event": "incomingRequest"
        },
        {
          "event": "incomingParent"
        }
      ],
      "properties": {
        "offset": {
          "x": 0,
          "y": 0
        }
      }
    },
    {
      "name": "send_catalog",
      "type": "send-and-wait-for-reply",
      "transitions": [
        {
          "next": "set_order_response",
          "event": "incomingMessage"
        },
        {
          "event": "timeout"
        },
        {
          "event": "deliveryFailure"
        }
      ],
      "properties": {
        "offset": {
          "x": 250,
          "y": 230
        },
        "service": "{{trigger.message.InstanceSid}}",
        "channel": "{{trigger.message.ChannelSid}}",
        "from": "{{flow.channel.address}}",
        "message_type": "content_template",
        "content_sid": "HXX",// Replace with  actual simple_catalog SID
        "timeout": "3600"
      }
    },
    {
      "name": "set_order_response",
      "type": "set-variables",
      "transitions": [
        {
          "event": "next"
        }
      ],
      "properties": {
        "variables": [
          {
            "type": "string",
            "value": "{{widgets.send_catalog.inbound.Order}}",
            "key": "order_response"
          }
        ],
        "offset": {
          "x": 250,
          "y": 470
        }
      }
    }
  ],
  "initial_state": "Trigger",
  "flags": {
    "allow_concurrent_calls": true
  }
}

3.发送消息至 Whatsapp 发件人:

发送消息后,查看Flow Log执行情况。

查找 send_catalog 小部件的 DeliveryFailure 事件。 展开条目并检查调试信息 > 详细信息:

Failure sending message: Unsupported Content Template Type

twilio
1个回答
0
投票

我刚刚跟进了我们的开发团队,不幸的是,对话目前不支持内容类型“twilio/catalog”。您可以在我们的文档中找到支持的类型的完整列表。

话虽如此,我们不断向消息传递和对话服务添加新的内容类型,尤其是这一内容类型已在我们的路线图上。

© www.soinside.com 2019 - 2024. All rights reserved.