動作連結可讓使用者與深層連結互動,連結會連往合作夥伴的網站,以便執行動作。深層連結會顯示在商家知識面板中。本指南將說明如何在動態饋給中加入動作連結。
商家層級動作連結
如果特定商家的所有服務都會將使用者重新導向夥伴網站上的相同到達網頁,您應透過商家動態饋給提供動作連結。
必須使用 ActionLinkType
指定動作類型,該屬性是商家動態饋給中的 ActionLink
的一部分。
// Predetermined type of action associated with an action link. enum ActionLinkType { // The action link type is unspecified. ACTION_LINK_TYPE_UNSPECIFIED = 0; // The action link type is booking an appointment. ACTION_LINK_TYPE_BOOK_APPOINTMENT = 1; // The action link type is booking an online appointment. ACTION_LINK_TYPE_BOOK_ONLINE_APPOINTMENT = 2; // The action link type is ordering food for delivery or takeout or both. ACTION_LINK_TYPE_ORDER_FOOD = 3; // The action link type is ordering food for delivery. ACTION_LINK_TYPE_ORDER_FOOD_DELIVERY = 4; // The action link type is ordering food for takeout. ACTION_LINK_TYPE_ORDER_FOOD_TAKEOUT = 5; // The action link type is making a dining reservation. ACTION_LINK_TYPE_MAKE_DINING_RESERVATION = 6; // The action link type allows users to shop from the given merchant. It // could either be delivery or pickup. ACTION_LINK_TYPE_SHOP_ONLINE = 7; }