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

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

מחיר לכל צוות/זמן

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

  • בפיד של המוכר, מגדירים 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.

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

בדוגמה הזו, רועי (מזהה: 1) הוא מעצב שיער מנוסה יותר מאשר גלית (מזהה: 2), ולכן בעלת הסלון החליטה להגדיר את המחיר של הפגישה עם רועי גבוה ב-5$. עלות התספורת לשיער קצר היא 80 ש"ח כברירת מחדל, ועלות התספורת לשיער ארוך היא 120 ש"ח כברירת מחדל. אם המשתמש יבחר ב-Robert, החיתוך יעלה 25 $או 35$, בהתאמה.

שם הצוות תספורת לשיער קצר תספורת לשיער ארוך
רחל 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 לפי שעון החוף המערבי בארה"ב. 1535821200 הוא השעה 10:00 באותו יום, 1535850000 הוא השעה 18:00 באותו יום ו-1535857200 הוא השעה 20:00.

השעה ביום תספורת לשיער קצר תספורת לשיער ארוך
10:00 עד 11:00 80 ש"ח 120 ש"ח
11:00 עד 12:00 80 ש"ח 120 ש"ח
12:00 עד 13:00 80 ש"ח 120 ש"ח
13:00 עד 14:00 80 ש"ח 120 ש"ח
14:00 עד 15:00 80 ש"ח 120 ש"ח
15:00 עד 16:00 80 ש"ח 120 ש"ח
16:00 עד 17:00 80 ש"ח 120 ש"ח
17:00 עד 18:00 80 ש"ח 120 ש"ח
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"]
        }
      ]
    }
  ]
}