创建和上传操作 Feed
在创建和上传操作 Feed 时,请务必按照以下说明操作:
- 请遵循
操作 Feed
是针对操作数据文件的两次上传之间必须使用唯一的操作数据文件名称。
建议在文件名中添加时间戳,例如
action1_1633621547.json
。 - 在文件集描述符中,将
name
字段设置为reservewithgoogle.action.v2
。如需查看描述符文件的示例,请参阅描述符文件 JSON 示例。 在两次上传之间,您必须使用唯一的描述符文件名。 建议在文件名中添加时间戳,例如action1_1633621547.filesetdesc.json
。 描述符文件必须上传到常规 SFTP Dropbox。 - 每天必须将 Feed 上传到常规 SFTP Dropbox 刷新。
- 您可以在以下位置找到常规 Feed SFTP Dropbox 信息: 配置 >Feed 部分。
- 您可以在以下位置找到常规 Feed 提取状态: Feed >历史记录部分。
定义
<ph type="x-smartling-placeholder">ActionFeed 定义
message ActionFeed { repeated ActionDetail data = 1; }
ActionDetail 定义
message ActionDetail { string entity_id = 2; string link_id = 3; // Deep link for action detail string url = 4; repeated Action actions = 1; }
操作定义
// Information about an Action which could be performed. message Action { // Deprecated fields not to be reused. reserved 1; oneof action_info { FoodOrderingInfo food_ordering_info = 3; } }
FoodOrderingInfo 的定义
message FoodOrderingInfo { // Service type for food ordering action. enum ServiceType { UNKNOWN = 0; DELIVERY = 1; TAKEOUT = 2; } ServiceType service_type = 1 [features.field_presence = IMPLICIT]; }
操作 Feed 示例
仅提供送货服务
文件名 :actions1_1697754089.json
{ "data": [ { "actions": [{ "food_ordering_info": { "service_type": "DELIVERY" } }], "entity_id": "entity002", "link_id": "delivery_link/entity002", "url": "https://www.restaurant.com/delivery/entity002" } ] }
仅提供外卖服务
文件名 :actions1_1697754089.json
{ "data": [ { "actions": [{ "food_ordering_info": { "service_type": "TAKEOUT" } }], "entity_id": "entity002", "link_id": "takeout_link/entity002", "url": "https://www.restaurant.com/takeout/entity002" } ] }
配送和外带
文件名 :actions1_1697754089.json
{ "data": [ { "actions": [ { "food_ordering_info": { "service_type": "DELIVERY" } }, { "food_ordering_info": { "service_type": "TAKEOUT" } } ], "entity_id": "entity002", "link_id": "common_link/entity002", "url": "https://www.restaurant.com/commonlink/entity002" } ] }
送货+外带其他网址
文件名 :actions1_1697754089.json
{ "data": [ { "actions": [ { "food_ordering_info": { "service_type": "TAKEOUT" } } ], "entity_id": "entity002", "link_id": "takeout_link/entity002", "url": "https://www.restaurant.com/takeout/entity002" }, { "actions": [ { "food_ordering_info": { "service_type": "DELIVERY" } } ], "entity_id": "entity002", "link_id": "delivery_link/entity002", "url": "https://www.restaurant.com/delivery/entity002" } ] }
描述符文件
文件名 :actions1_1697754089.filesetdesc.json
{ "generation_timestamp": 1697754089, "name": "reservewithgoogle.action.v2", "data_file": ["actions1_1697754089.json"] }