Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Użyj identyfikatora grupy
Domyślnie dodawanie wielu kart do jednej karty
Link Dodaj do Portfela Google nie grupuje tych kart w
w aplikacji Portfel Google użytkownika. Karty można jednak grupować, tworząc
upewnij się, że wszystkie mają ten sam identyfikator grupy. Zgrupowane karty będą się wyświetlać razem
w aplikacji Portfel Google. Po wybraniu grupy kart każda z nich zostanie
będą wyświetlane w karuzeli.
Aby dodać kartę do grupy, właściwość groupingInfo.groupingId
musisz ustawić obiekt karty. Wszystkie obiekty przekazujące z takim samym
Wartość groupingId będzie automatycznie zgrupowana, nawet jeśli
zostały dodane oddzielnie.
Przykład poniżej pokazuje kartę lojalnościową i ofertę pogrupowane według grup
zachęcić użytkowników do skorzystania z obu tych narzędzi przy następnym zakupie.
Czasami bilety na wydarzenia są używane w grupie, a nie pojedynczo. Częstym
Przykładem może być grupowanie biletów dla kilku członków rodziny.
Bilety na wydarzenia zawierają dodatkową logikę, która umożliwia automatyczne grupowanie na podstawie
tych właściwości:
EventClass.eventId
EventClass.eventName
EventClass.dateTime.start
Część identyfikatora wydawcy EventObject.id
.
Grupowanie za pomocą funkcji EventClass.eventId
Obiekty biletu na wydarzenie są automatycznie grupowane, jeśli mają te same wartości
dla następujących usług:
EventClass.eventId
Część identyfikatora wydawcy EventObject.id
Jeśli obiekty biletu na wydarzenie spełniają te kryteria, zostaną zgrupowane nawet wtedy, gdy
EventClass.eventName i EventClass.dateTime.start są różne.
Grupowanie bez EventClass.eventId
Jeśli atrybut EventClass.eventId nie jest skonfigurowany, będą automatycznie grupowane, jeśli parametr
te właściwości są takie same.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2025-09-04 UTC."],[[["\u003cp\u003eMultiple passes can be grouped within the Google Wallet app for a better user experience by assigning them the same \u003ccode\u003egroupingId\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003ePasses can be grouped during initial creation or later using the \u003ccode\u003eupdate\u003c/code\u003e or \u003ccode\u003epatch\u003c/code\u003e methods.\u003c/p\u003e\n"],["\u003cp\u003eEvent tickets have automatic grouping logic based on shared event details, but using the \u003ccode\u003egroupingInfo\u003c/code\u003e property with a \u003ccode\u003egroupingId\u003c/code\u003e will override this behavior.\u003c/p\u003e\n"],["\u003cp\u003eWhen grouping event tickets, \u003ccode\u003eEventClass.eventId\u003c/code\u003e takes precedence, followed by a combination of \u003ccode\u003eEventClass.eventName\u003c/code\u003e, \u003ccode\u003eEventClass.dateTime.start\u003c/code\u003e, and the Issuer ID.\u003c/p\u003e\n"]]],["Passes in Google Wallet can be grouped by setting the `groupingInfo.groupingId` property to the same value for each pass. Grouping can occur during initial provisioning or via `update` or `patch` methods. Event tickets are automatically grouped based on `EventClass.eventId` and the Issuer ID, or if no eventId is set based on `EventClass.eventName`, `EventClass.dateTime.start`, and the Issuer ID. Setting the `groupingInfo` property overrides automatic grouping for event tickets.\n"],null,["# Group multiple Event tickets\n\nUse a grouping ID\n-----------------\n\n\nBy default, adding multiple passes to a single\n**Add to Google Wallet** link will not group those passes in the\nuser's Google Wallet app. However, passes can be grouped together by making\nsure they all have the same grouping ID. Grouped passes will appear together\nin the Google Wallet app. When a group of passes is selected, each pass will\nbe shown on a carousel.\n\nPasses can be grouped together:\n\n- During initial provisioning\n- By using the [`update`](/wallet/tickets/events/rest/v1/eventticketobject/update) or [`patch`](/wallet/tickets/events/rest/v1/eventticketobject/patch) methods\n\n\nTo add a pass to a group, the `groupingInfo.groupingId` property of\nthe pass object must be set. All pass objects with the same\n`groupingId` value will be automatically grouped together, even if\nthey were added separately.\n\n\nThe following example shows a loyalty card and offer being grouped together to\nentice the user to make use of both in their next purchase. \n\n```carbon\nloyaltyObject = {\n \"classId\": \"ISSUER_ID.GIFT_CARD_CLASS_SUFFIX\",\n \"id\": \"ISSUER_ID.GIFT_CARD_OBJECT_SUFFIX\",\n \"state\": \"ACTIVE\",\n \"groupingInfo\": {\n # Note the same groupingId value\n \"groupingId\": \"combinedGiftCardAndOfferId\",\n \"sortIndex\": 1\n },\n \"barcode\": {\n \"type\": \"QR_CODE\",\n \"value\": \"QR code\"\n },\n \"accountId\": \"Account id\",\n \"accountName\": \"Account name\",\n \"loyaltyPoints\": {\n \"label\": \"Points\",\n \"balance\": {\n \"int\": 800\n }\n }\n}\n\nofferObject = {\n \"classId\": \"ISSUER_ID.OFFER_CLASS_SUFFIX\",\n \"id\": \"ISSUER_ID.OFFER_OBJECT_SUFFIX\",\n \"state\": \"ACTIVE\",\n \"groupingInfo\": {\n # Note the same groupingId value\n \"groupingId\": \"combinedGiftCardAndOfferId\",\n \"sortIndex\": 2\n },\n \"barcode\": {\n \"type\": \"QR_CODE\",\n \"value\": \"QR code\",\n },\n}\n```\n\nEvent ticket automatic grouping\n-------------------------------\n\n| **Note:** The `groupingInfo` property of a pass will always take precedence over the automatic grouping logic used by Event tickets.\n\nSometimes event tickets are used in a group rather than individually. A common\nscenario for this is grouping of tickets for multiple family members.\n\nEvent tickets have additional logic that enables automatic grouping based on\nthe following properties:\n\n- `EventClass.eventId`\n- `EventClass.eventName`\n- `EventClass.dateTime.start`\n- The Issuer ID portion of `EventObject.id`\n\n| **Note:** If `EventClass.eventId` is set, it takes precedence in order to determine what objects are considered to be in a group.\n\n### Grouping with `EventClass.eventId`\n\nEvent ticket objects are automatically grouped when they have the same values\nfor the following properties:\n\n- `EventClass.eventId`\n- The Issuer ID portion of `EventObject.id`\n\nWhen event ticket objects meet this criteria, they will be grouped even when\n`EventClass.eventName` and `EventClass.dateTime.start` are different.\n\n### Grouping without `EventClass.eventId`\n\nIf `EventClass.eventId` isn't set, they will be automatically grouped if the\nfollowing properties are the same.\n\n- `EventClass.eventName`\n- `EventClass.dateTime.start`\n- The Issuer ID portion of `EventObject.id`\n\n| **Note:** `EventClass.dateTime.start` is an optional property. If it isn't set, then only `EventClass.eventName` and the Issuer ID portion of `EventObject.id` are used to determine grouping."]]