[null,null,["上次更新時間:2025-08-29 (世界標準時間)。"],[[["\u003cp\u003eGoogle Wallet now allows adding clickable modules to objects and classes to enhance user engagement with links to issuer content.\u003c/p\u003e\n"],["\u003cp\u003eThese modules, configured using ValueAddedModuleData, can include a header, body, image, and a URI link, and are displayed on the pass details page.\u003c/p\u003e\n"],["\u003cp\u003eModules can be customized with display intervals and sort indexes for optimized visibility and prioritization.\u003c/p\u003e\n"],["\u003cp\u003eYou can add up to 10 modules per object/class, with a maximum of 10 displayed, prioritizing object modules over class modules based on view constraints.\u003c/p\u003e\n"],["\u003cp\u003eWhen designing modules, ensure clear language, relevant imagery, and active management for the best user experience.\u003c/p\u003e\n"]]],["To enable modules, update objects/classes with `ValueAddedModuleData`, including a required header (max 60 characters) and URI. Optional fields include body text (max 50 characters), image, `displayInterval` for time-based visibility, and `sortIndex` for module order. Modules link to external content. Ensure modules are actionable, relevant, and use appropriate imagery. Up to ten modules can be added per object or class, but only a max of ten will be displayed.\n"],null,["# Value Added Opportunities\n\nBackground\n----------\n\n\nYou can now update objects and classes to include value added opportunity modules. Modules will be\ndisplayed on the details page and can link to issuer content. This document walks through the\nkey steps required to enable and use modules using the Google Wallet API.\n| **Note:** For gift cards, loyalty cards, and offers we also support an automatic integration with [Shopping Merchant Center](https://www.google.com/retail/).\n\n### Feature example\n\n|-------------|-----------|\n| | |\n| Single view | List view |\n\n**The following guide assumes you are familiar with the basic concepts of Google Wallet and have already\ncompleted the recommended\n[prerequisites](/wallet/retail/offers/getting-started/onboarding-guide).\nSend any questions or feedback to your Google Wallet POC.**\n\nIntegration Steps\n-----------------\n\n\nTo add a new module you will need to update the object and/or class to include\n[ValueAddedModuleData](/wallet/retail/offers/rest/v1/ValueAddedModuleData).\nValueAddedModuleData has the following fields:\n\n### **\\[Required\\] LocalizedString header**\n\nThe header displayed on the module. Character limit is 60 and longer strings will be truncated. \n\n### **LocalizedString body**\n\nThe body displayed on the module. Character limit is 50 and longer strings will be truncated. \n\n### **Image image**\n\nThe image displayed on the module. The recommended image ratio is 1:1 and images will be resized to fit this ratio. \n\n### **\\[Required\\] string uri**\n\nThe URI that the module leads to when clicked. This can be a web link or a [deep link.](https://developer.android.com/training/app-links/deep-linking). \n\n### **ModuleViewConstraints viewConstraints**\n\nConstraints that all must be met for the module to be shown. ModuleViewConstraints has the following field: \n\n### **TimeInterval displayInterval**\n\nThe period of time that the module will be displayed to users. Can define both a \\`startTime\\` and \\`endTime\\`. The module is displayed immediately after insertion unless a \\`startTime\\` is set. The module is displayed indefinitely if \\`endTime\\` is not set. \n\n### **int32 sortIndex**\n\nThe index for sorting the modules. Modules with a lower sort index are shown before modules with a higher sort index. If unspecified, the sort index is assumed to be INT_MAX. For two modules with the same index, the sorting behavior is undefined. \n\n### **Example ValueAddedModuleData:**\n\n```scdoc\n {\n \"valueAddedModuleData\": [\n {\n \"header\": {\n \"defaultValue\": {\n \"language\": \"en-US\",\n \"value\": \"10% off merch\"\n }\n },\n \"body\": {\n \"defaultValue\": {\n \"language\": \"en-US\",\n \"value\": \"Shirts, caps, mugs, and more\"\n }\n },\n \"image\": {\n \"sourceUri\": {\n \"uri\": \"http://www.images.google.com/opportunity\"\n }\n },\n \"uri\": \"http://www.google.com/opportunity\",\n \"viewConstraints\": {\n \"displayInterval\": {\n \"start\": {\n \"date\": \"2024-08-01T18:30:00\"\n },\n \"end\": {\n \"date\": \"2025-08-01T18:30:00\"\n }\n }\n },\n \"sortIndex\": 0\n },\n {\n \"header\": {\n \"defaultValue\": {\n \"language\": \"en-US\",\n \"value\": \"10% off concessions\"\n }\n },\n \"uri\": \"http://www.google.com/new_opportunity\"\n }\n ]\n }\n```\n| **Note:** You can add up to ten modules to the object and up to ten modules in the class. However, a max of ten modules will be displayed on the pass. We will prioritize the modules from the object filtering out those that don't meet the view constraints.\n\nExpected Behavior\n-----------------\n\n\nAfter successfully updating the object and/or class you will now see modules on the corresponding\npass. If you have added only one module you will see it on the front of the pass. \n\nGuidelines on Value Added Opportunity Modules\n---------------------------------------------\n\n\nModules are opportunities for you to augment your user's pass experience with additional actions.\nYou should consider the following when creating and managing the modules:\n\n- Modules should be defined with appropriate language to indicate that they are actionable to help users understand that these modules are clickable.\n- Modules should have the appropriate imagery defined that is related to the specific module.\n- You are in control of the modules and should proactively manage the prioritization of the module depending on the importance and relevance.\n- You should only show users modules that are active. You can control this by setting the displayInterval on the module or proactively adding or removing it from the class or object.\n\nException handling\n------------------\n\n| **Message** | **Reason** |\n|-------------------------------------------------------------|-----------------------------------------------------|\n| ValueAddedModuleData must contain a header. | ValueAddedModuleData does not have a header. |\n| ValueAddedModuleData must contain a non-empty URI. | ValueAddedModuleData does not have a non-empty URI. |\n| A maximum of 10 value added modules are allowed per class. | Need to reduce value added modules on the class. |\n| A maximum of 10 value added modules are allowed per object. | Need to reduce value added modules on the object. |"]]