[null,null,["最后更新时间 (UTC):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 clickable URI leading to external or deep-linked content.\u003c/p\u003e\n"],["\u003cp\u003eDisplay of modules can be controlled by setting time-based view constraints and prioritizing them using a sort index within a limit of ten modules per object/class.\u003c/p\u003e\n"],["\u003cp\u003eUsers will see these modules on the front of their pass, providing opportunities for additional actions or information relevant to the pass content.\u003c/p\u003e\n"],["\u003cp\u003eWhen designing modules, ensure clear language, relevant imagery, and proactive management for optimal user experience and relevance.\u003c/p\u003e\n"]]],["To enable modules, update objects/classes with `ValueAddedModuleData`, including a header, body, image, and URI. Set `displayInterval` to control module visibility and `sortIndex` for prioritization. Modules, displayed on the pass, offer additional actions and link to external content. Manage their prioritization and visibility via `displayInterval`, adding or removing them as needed. Each class and object can support a maximum of ten modules. Modules have character limits, truncated if needed.\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/events/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/events/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. |"]]