יש להגדיר מחיר ספציפי לצוות או למחיר ספציפי

במדריך הבא מוסבר איך להטמיע את הפידים כדי ליצור תמחור שונה לשירות בהתאם לעובדים המשויכים אליו, לשעה ביום ו/או ליום בשבוע.

מחיר לצוות/לשעה

יש 4 דברים להגדיר:

  • בפיד של Merchant Center צריך להגדיר Merchant.payment_option אחד לכל אפשרות מחיר

    • מגדירים את הערך הרצוי בשדה price למחיר השירות לשעה או לצוות הספציפיים
    • הערך payment_option_id חייב להיות ייחודי בכל השילוב, כי ערכי payment_option_id משותפים בין כל המוכרים של אותו אתר אגרגטור. כדי למנוע בלבול ולפשט את פתרון הבעיות והניהול, מומלץ להגדיר (מחדש) לכל מוכר את כל ערכי payment_option שבהם משתמש המוכר הזה באמצעות payment_option_id ייחודי (גם אם נעשה שימוש ב-payment_option זהה על ידי מוכר אחר).

      • עבור מחיר לצוות, מומלץ ליצור את השדה payment_option_id כשילוב של merchant_id, service_id ו-staff_id כדי לאפשר מעקב קל יותר ולהבטיח שה-payment_option_id יהיה ייחודי בכל השילוב
      • כדי לחשב את המחיר לזמן מסוים, מומלץ ליצור את השדה payment_option_id כשילוב של הערכים merchant_id, service_id ומחרוזת שמייצגת את הזמן הזה (evening, weekends, sundayafternoon ...) כדי לאפשר מעקב קל יותר ולהבטיח שה-payment_option_id יהיה ייחודי בכל השילוב
      • בתמחור ברמת הזמינות (בתרחיש לדוגמה של המדריך הזה), השם והתיאור משמשים בעיקר למטרות ניפוי באגים
      • אין להגדיר יותר מ-100 ערכים של payment_option למוכר אחד. אם צפויה להגיע ליותר מ-100 ערכים של payment_option, יש להריץ את ההטמעה הזו על ידי איש הקשר בחשבון Google
      • בתרחיש לדוגמה הזה אפשר להתעלם מכל השדות האחרים מסוג payment_option
  • בפיד 'זמינות', מגדירים את Availability.payment_option_id למערך פריטים יחיד עם payment_option_id של payment_option שהגדרתם ברמת Merchant

  • בפיד השירות, מגדירים את Service.price לערך הנמוך ביותר של טווח המחירים עבור השירות הזה, ומגדירים את הערך של Service.price_interpretation כ-STARTS_AT

דוגמה למחיר לצוות

בדוגמה הזו, רוברט (id: 1) הוא ספר מנוסה יותר מאשר דנה (מזהה: 2), ולכן בעל הסלון החליט להזמין מקום אצל רוברט 5 $יותר יקר. העלות לתספורת קצרה היא 20 $כברירת מחדל, והעלות לתספורת ארוכה היא 30 $כברירת מחדל. אם המשתמש יבחר את רון, עלות הקיצוץ תהיה 100 ש"ח או 140 ש"ח, בהתאמה.

שם הצוות תספורת לשיער קצר תספורת לשיער ארוך
רחל $20* $30*
Robert 25 $35

*מחיר ברירת המחדל של השירות

מוכרים

{
  "metadata": {
    "processing_instruction": "PROCESS_AS_COMPLETE",
    "generation_timestamp": 1503638100,
    "total_shards": 1
  },
  "merchant": [
    {
      "category": "beauty_salon",
      "merchant_id": "beauty-per-staff-price",
      "name": "Beauty Salon",
      "url": "www.merchantspublicsite.com",
      "telephone": "+1 123-456-7890",
      "geo": {
        "latitude": 37.422113,
        "longitude": -122.084041,
        "address": {
          "locality": "Mountain View",
          "country": "US",
          "region": "CA",
          "street_address": "1600 Amphitheatre Pkwy",
          "postal_code": "94043"
        }
      },
      "payment_option": [
        {
          "payment_option_id": "beauty-per-staff-price-haircut-short-1",
          "name": "Short haircut (Robert)",
          "description": "Short hair haircut price for Robert",
          "price": {
            "currency_code": "USD",
            "price_micros": 25000000
          }
        },
        {
          "payment_option_id": "beauty-per-staff-price-haircut-short-default",
          "name": "Short haircut (Default)",
          "description": "Normal short hair haircut price",
          "price": {
            "currency_code": "USD",
            "price_micros": 20000000
          }
        },
        {
          "payment_option_id": "beauty-per-staff-price-haircut-long-1",
          "name": "Long haircut (Robert)",
          "description": "Long hair haircut price for Robert",
          "price": {
            "currency_code": "USD",
            "price_micros": 35000000
          }
        },
        {
          "payment_option_id": "beauty-per-staff-price-haircut-long-default",
          "name": "Long haircut (Default)",
          "description": "Normal long hair haircut price",
          "price": {
            "currency_code": "USD",
            "price_micros": 30000000
          }
        }
      ]
    }
  ]
}

שירותים

{
  "metadata": {
    "processing_instruction": "PROCESS_AS_COMPLETE",
    "generation_timestamp": 1535437200,
    "total_shards": 1
  },
  "service": [
    {
      "service_id": "haircut-short",
      "prepayment_type": "NOT_SUPPORTED",
      "merchant_id": "beauty-per-staff-price",
      "price": {
        "currency_code": "USD",
        "price_micros": 20000000
      },
      "localized_service_name": {
        "value": "Haircut (shorter than shoulder)",
        "localized_value": [
          {
            "locale": "en",
            "value": "Haircut (shorter than shoulder)"
          }
        ]
      },
      "localized_description": {
        "value": "Awesome haircut for short hair",
        "localized_value": [
          {
            "locale": "en",
            "value": "Awesome haircut for short hair"
          }
        ]
      }
    },
    {
      "service_id": "haircut-long",
      "prepayment_type": "NOT_SUPPORTED",
      "merchant_id": "beauty-per-staff-price",
      "price": {
        "currency_code": "USD",
        "price_micros": 30000000
      },
      "localized_service_name": {
        "value": "Haircut (longer than shoulder)",
        "localized_value": [
          {
            "locale": "en",
            "value": "Haircut (longer than shoulder)"
          }
        ]
      },
      "localized_description": {
        "value": "Awesome haircut for long hair",
        "localized_value": [
          {
            "locale": "en",
            "value": "Awesome haircut for long hair"
          }
        ]
      }
    }
  ]
}

זמינות

{
  "metadata": {
    "processing_instruction": "PROCESS_AS_COMPLETE",
    "generation_timestamp": 1535178900,
    "total_shards": 1
  },
  "service_availability": [
    {
      "availability": [
        {
          "spots_total": 1,
          "start_sec": 1535806800,
          "spots_open": 1,
          "duration_sec": 3600,
          "recurrence": {
            "repeat_until_sec": 1535846340,
            "repeat_every_sec": 3600
          },
          "service_id": "haircut-short",
          "merchant_id": "beauty-per-staff-price",
          "resources": {
            "staff_name": "Robert",
            "staff_id": "1"
          },
          "payment_option_id": ["beauty-per-staff-price-haircut-short-1"]
        },
        {
          "spots_total": 1,
          "start_sec": 1535806800,
          "spots_open": 1,
          "duration_sec": 3600,
          "recurrence": {
            "repeat_until_sec": 1535846340,
            "repeat_every_sec": 3600
          },
          "service_id": "haircut-long",
          "merchant_id": "beauty-per-staff-price",
          "resources": {
            "staff_name": "Robert",
            "staff_id": "1"
          },
          "payment_option_id": ["beauty-per-staff-price-haircut-long-1"]
        },
        {
          "spots_total": 1,
          "start_sec": 1535806800,
          "spots_open": 1,
          "duration_sec": 3600,
          "recurrence": {
            "repeat_until_sec": 1535846340,
            "repeat_every_sec": 3600
          },
          "service_id": "haircut-short",
          "merchant_id": "beauty-per-staff-price",
          "resources": {
            "staff_name": "Jane",
            "staff_id": "2"
          },
          "payment_option_id": ["beauty-per-staff-price-haircut-short-default"]
        },
        {
          "spots_total": 1,
          "start_sec": 1535806800,
          "spots_open": 1,
          "duration_sec": 3600,
          "recurrence": {
            "repeat_until_sec": 1535846340,
            "repeat_every_sec": 3600
          },
          "service_id": "haircut-long",
          "merchant_id": "beauty-per-staff-price",
          "resources": {
            "staff_name": "Jane",
            "staff_id": "2"
          },
          "payment_option_id": ["beauty-per-staff-price-haircut-long-default"]
        }
      ]
    }
  ]
}

דוגמה למחיר לפי זמן

בדוגמה הזו, הסלון פתוח בין השעות 10:00 ל-20:00. בעל הסלון החליט להוסיף עלות נוספת של 5 $עבור הזמנות אחרי 18:00.

הדוגמה לזמינות מוגדרת ליום שבת, 1 בספטמבר 2018 באזור הזמן של PT. 1535821200 הוא 10:00 באותו יום, הערך 1535850000 הוא 18:00 באותו יום ו-1535857200 הוא 20:00.

השעה ביום תספורת לשיער קצר תספורת לשיער ארוך
10:00 ~ 11:00 $20 $30
11:00 ~ 12:00 $20 $30
12:00 ~ 13:00 $20 $30
13:00 ~ 14:00 $20 $30
14:00 ~ 15:00 $20 $30
15:00 ~ 16:00 $20 $30
16:00 ~ 17:00 $20 $30
17:00 ~ 18:00 $20 $30
18:00 ~ 19:00 25 $35
19:00 ~ 20:00 25 $35

מוכרים

{
  "metadata": {
    "processing_instruction": "PROCESS_AS_COMPLETE",
    "generation_timestamp": 1503638100,
    "total_shards": 1
  },
  "merchant": [
    {
      "category": "beauty_salon",
      "merchant_id": "beauty-per-time-price",
      "name": "Beauty Salon",
      "url": "www.merchantspublicsite.com",
      "telephone": "+1 123-456-7890",
      "geo": {
        "latitude": 37.422113,
        "longitude": -122.084041,
        "address": {
          "locality": "Mountain View",
          "country": "US",
          "region": "CA",
          "street_address": "1600 Amphitheatre Pkwy",
          "postal_code": "94043"
        }
      },
      "payment_option": [
        {
          "payment_option_id": "beauty-per-time-price-haircut-short-evening",
          "name": "Short haircut (Evening)",
          "description": "Short hair haircut price for the evening",
          "price": {
            "currency_code": "USD",
            "price_micros": 25000000
          }
        },
        {
          "payment_option_id": "beauty-per-time-price-haircut-short-default",
          "name": "Short haircut (Normal)",
          "description": "Short hair haircut price for the rest of the day",
          "price": {
            "currency_code": "USD",
            "price_micros": 21000000
          }
        },
        {
          "payment_option_id": "beauty-per-time-price-haircut-long-evening",
          "name": "Long haircut (Evening)",
          "description": "Long hair haircut price for the evening",
          "price": {
            "currency_code": "USD",
            "price_micros": 35000000
          }
        },
        {
          "payment_option_id": "beauty-per-time-price-haircut-long-default",
          "name": "Long haircut (Normal)",
          "description": "Long hair haircut price for the rest of the day",
          "price": {
            "currency_code": "USD",
            "price_micros": 31000000
          }
        }
      ]
    }
  ]
}

שירותים

{
  "metadata": {
    "processing_instruction": "PROCESS_AS_COMPLETE",
    "generation_timestamp": 1535437200,
    "total_shards": 1
  },
  "service": [
    {
      "service_id": "haircut-short",
      "prepayment_type": "NOT_SUPPORTED",
      "merchant_id": "beauty-per-time-price",
      "price": {
        "currency_code": "USD",
        "price_micros": 2100000
      },
      "localized_service_name": {
        "value": "Haircut (shorter than shoulder)",
        "localized_value": [
          {
            "locale": "en",
            "value": "Haircut (shorter than shoulder)"
          }
        ]
      },
      "localized_description": {
        "value": "Awesome haircut for short hair",
        "localized_value": [
          {
            "locale": "en",
            "value": "Awesome haircut for short hair"
          }
        ]
      }
    },
    {
      "service_id": "haircut-long",
      "prepayment_type": "NOT_SUPPORTED",
      "merchant_id": "beauty-per-time-price",
      "price": {
        "currency_code": "USD",
        "price_micros": 31000000
      },
      "localized_service_name": {
        "value": "Haircut (longer than shoulder)",
        "localized_value": [
          {
            "locale": "en",
            "value": "Haircut (longer than shoulder)"
          }
        ]
      },
      "localized_description": {
        "value": "Awesome haircut for long hair",
        "localized_value": [
          {
            "locale": "en",
            "value": "Awesome haircut for long hair"
          }
        ]
      }
    }
  ]
}

זמינות

{
  "metadata": {
    "processing_instruction": "PROCESS_AS_COMPLETE",
    "generation_timestamp": 1535178900,
    "total_shards": 1
  },
  "service_availability": [
    {
      "availability": [
        {
          "spots_total": 1,
          "start_sec": 1535821200,
          "spots_open": 1,
          "duration_sec": 3600,
          "recurrence": {
            "repeat_until_sec": 1535849940,
            "repeat_every_sec": 3600
          },
          "service_id": "haircut-short",
          "merchant_id": "beauty-per-time-price",
          "payment_option_id": ["beauty-per-time-price-haircut-short-default"]
        },
        {
          "spots_total": 1,
          "start_sec": 1535821200,
          "spots_open": 1,
          "duration_sec": 3600,
          "recurrence": {
            "repeat_until_sec": 1535849940,
            "repeat_every_sec": 3600
          },
          "service_id": "haircut-long",
          "merchant_id": "beauty-per-time-price",
          "payment_option_id": ["beauty-per-time-price-haircut-long-default"]
        },
        {
          "spots_total": 1,
          "start_sec": 1535850000,
          "spots_open": 1,
          "duration_sec": 3600,
          "recurrence": {
            "repeat_until_sec": 1535857140,
            "repeat_every_sec": 3600
          },
          "service_id": "haircut-short",
          "merchant_id": "beauty-per-time-price",
          "payment_option_id": ["beauty-per-time-price-haircut-short-evening"]
        },
        {
          "spots_total": 1,
          "start_sec": 1535850000,
          "spots_open": 1,
          "duration_sec": 3600,
          "recurrence": {
            "repeat_until_sec": 1535857140,
            "repeat_every_sec": 3600
          },
          "service_id": "haircut-long",
          "merchant_id": "beauty-per-time-price",
          "payment_option_id": ["beauty-per-time-price-haircut-long-evening"]
        }
      ]
    }
  ]
}