تحديد سعر خاص بالموظفين أو أسعار محددة زمنيًا

يشرح البرنامج التعليمي التالي كيفية تنفيذ خلاصاتك لتمييز أسعار إحدى الخدمات بناءً على الموظف المرتبط أو الوقت من اليوم و/أو اليوم من الأسبوع.

السعر لكلّ موظف في الوقت

هناك 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 دولارات أكثر تكلفة. تبلغ تكلفة قص الشعر القصير 20 دولارًا افتراضيًا، بينما تبلغ تكلفة قص الشعر الطويل 30 دولارًا افتراضيًا. إذا اختار المستخدم روبرت، فستكون تكلفة الخفض 25 دولارًا أو 35 دولارًا، على التوالي.

اسم الموظفين قص شعر قصير قص شعر طويل
سماح $20* $30*
Robert دولار هونغ كونغ $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 $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
من 5:00 إلى 18:00 $20 $30
من 6:00 إلى 19:00 دولار هونغ كونغ $35
من 5:00 بعد الظهر إلى 20:00 دولار هونغ كونغ $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"]
        }
      ]
    }
  ]
}