קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
שימוש במזהה קיבוץ
כברירת מחדל, הוספת כמה כרטיסים לכרטיס אחד
הקישור הוספה ל-Google Wallet לא יקבץ את הכרטיסים האלה ב
באפליקציית Google Wallet של המשתמש. עם זאת, אפשר לקבץ את הכרטיסים יחד.
לוודא שלכולם יש אותו מזהה קיבוץ. הכרטיסים שמקובצים יופיעו יחד
באפליקציית Google Wallet. כשבוחרים קבוצה של כרטיסים, כל כרטיס
מוצג בקרוסלה.
כדי להוסיף כרטיס לקבוצה, המאפיין groupingInfo.groupingId של
צריך להגדיר את אובייקט ה-pass. כל האובייקטים של העברת הנתונים עם אותם
הערך של groupingId יקובץ יחד באופן אוטומטי, גם אם
הם נוספו בנפרד.
בדוגמה הבאה מוצג כרטיס מועדון לקוחות ומבצע שמקובצים יחד.
תעודדו את המשתמשים להשתמש בשניהם ברכישה הבאה.
לפעמים משתמשים בכרטיסי עלייה למטוס בתוך קבוצה, במקום בנפרד.
במקרה הזה הוא קיבוץ של כרטיסים לטיסות עם חניות ביניים או כמה כרטיסים
עצירות ביניים.
לכרטיסי עלייה למטוס יש לוגיקה נוספת לקיבוץ אוטומטי של כרטיסים
יחד אם יש להם אותם הערכים עבור המאפיינים הבאים:
FlightClass.flightHeader.carrier.carrierIataCode
FlightClass.flightHeader.flightNumber
FlightClass.localScheduledDepartureDateTime
FlightObject.reservationInfo.confirmationCode
החלק של מזהה המנפיק בחשבון FlightObject.id
אם יש הבדלים באחד מהמאפיינים שלמעלה לגבי שני כרטיסי עלייה למטוס,
לא מקובצים (אלא אם עושים זאת באמצעות groupingInfo). כמו שאפשר לראות, שתי הכיתות
ומאפייני אובייקטים משפיעים על קיבוץ אוטומטי. ההגדרה הזו מאפשרת שימוש בכרטיסי עלייה למטוס
של מחלקות שונות שיקובצו יחד (למשל, כשטיסות שונות)
שבאותו נסיעה יש חברות תובלה שונות.
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-09-04 (שעון UTC)."],[[["\u003cp\u003eMultiple passes added to a single Google Wallet link can be grouped together using the same \u003ccode\u003egroupingId\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eGrouped passes are displayed together in the Google Wallet app and can be provisioned together or grouped later via update/patch methods.\u003c/p\u003e\n"],["\u003cp\u003eBoarding passes have automatic grouping logic based on shared flight details, but using the \u003ccode\u003egroupingInfo\u003c/code\u003e property overrides this automatic grouping.\u003c/p\u003e\n"]]],["Passes in Google Wallet can be grouped by assigning them a shared `groupingId` property, ensuring they appear together in the app. This grouping can occur during the initial provisioning or via `update` or `patch` methods. Boarding passes also have automatic grouping based on properties like carrier code, flight number, departure time, and confirmation code. Setting a `groupingInfo` overrides this automatic logic. A loyalty card and offer could be grouped using the same `groupingId`.\n"],null,["# Group multiple Boarding passes\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/boarding-passes/rest/v1/flightobject/update) or [`patch`](/wallet/tickets/boarding-passes/rest/v1/flightobject/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\nBoarding pass automatic grouping\n--------------------------------\n\n| **Note:** The `groupingInfo` property of a pass will always take precedence over the automatic grouping logic used by Boarding passes.\n\nSometimes boarding passes are used in a group rather than individually. A common\nscenario for this is grouping of tickets for flights with layovers or multiple\nstops.\n\nBoarding passes have additional logic that will automatically group passes\ntogether if they have the same values for the following properties:\n\n- `FlightClass.flightHeader.carrier.carrierIataCode`\n- `FlightClass.flightHeader.flightNumber`\n- `FlightClass.localScheduledDepartureDateTime`\n- `FlightObject.reservationInfo.confirmationCode`\n- The Issuer ID portion of `FlightObject.id`\n\nIf any of the above properties are different for two Boarding passes, they are\nnot grouped (unless you do so using `groupingInfo`). As you can see, both class\nand object properties affect automatic grouping. This enables Boarding passes\nof different classes to be grouped together (such as when different flights\nin the same trip have different operating carriers)."]]