[null,null,["最后更新时间 (UTC):2025-08-29。"],[[["\u003cp\u003eGoogle Wallet now allows adding clickable modules to objects and classes, enhancing user engagement with links to issuer content.\u003c/p\u003e\n"],["\u003cp\u003eThese modules, displayed on the pass details page, can be customized with headers, body text, images, and links to external URIs or deep links.\u003c/p\u003e\n"],["\u003cp\u003eTo implement, update your object/class with \u003ccode\u003eValueAddedModuleData\u003c/code\u003e, defining module content and display constraints like time intervals and sort order.\u003c/p\u003e\n"],["\u003cp\u003eA maximum of 10 modules are allowed per object/class, with object modules prioritized and displayed based on view constraints.\u003c/p\u003e\n"],["\u003cp\u003eDesign modules with clear language and relevant imagery, ensuring they are actionable and actively managed to maintain user relevance.\u003c/p\u003e\n"]]],["To use value-added modules in Google Wallet, update objects/classes with `ValueAddedModuleData`. Required fields are a header (max 60 characters) and a URI (web or deep link). Optional fields include body text (max 50 characters), an image, a display time interval, and a sort index. Modules appear on the pass, are clickable, and can have time-based constraints. Up to ten modules per object/class are allowed, but the pass displays a maximum of ten. Prioritize and manage active modules.\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/tickets/boarding-passes/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/tickets/boarding-passes/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. |"]]