تحديد مدى توفُّر المراسلة

قبل أن يتمكن المستخدمون من بدء محادثات مع وكيلك، عليك تحديد مدى توفّر المراسلة في وكيلك في ميزة "الرسائل التجارية".

إذا أرسل أحد المستخدمين رسالة إلى وكيلك خلال ساعات العمل المتاحة، فإنه يرحب بالمستخدم من خلال رسالة ترحيب وبدء المحادثة. وإذا بدأت المحادثة خارج ساعات العمل المتاحة، ستظهر للمستخدمين رسالة الوكيل بلا اتصال بالإنترنت. انظر بدء المحادثة لمزيد من المعلومات عن هذه الرسائل.

برنامج التتبُّع ومدى توفُّر الموظفين

يمكنك تحديد مدى توفّر برنامج تتبُّع منفصل وآخر ممثل للإنسان.

إذا كان لديك أي نوع من البرمجة التي تنشئ رسائل للوكيل، سواء كان التشغيل التلقائي عبارة عن استجابة تلقائية تخبر المستخدمين بمكانهم في قائمة انتظار، أو وكيل معقد لفهم اللغة الطبيعية لديه حق الوصول الديناميكي إلى تفاصيل المستخدم، أو أي شيء بين ذلك - حدد مدى توفر مراسلات برنامج التتبُّع.

يُعد توفُّر العنصر البشري أمرًا ضروريًا إذا كنت تريد إطلاق وكيل على نقاط دخول تديرها Google، بما في ذلك نقاط الدخول المستندة إلى الموقع الجغرافي ونقاط الدخول غير المحلية (باستثناء "إعلانات Google"). بالنسبة إلى توفُّر موظّفي الدعم، يُرجى تحديد أيام الأسبوع وساعات العمل المتاحة لموظفي الدعم مباشرةً للإجابة عن الأسئلة.

إذا كان ممثلو برامج التتبُّع متاحين على مدار 24 ساعة في اليوم، ولكن الممثلين متاحون من الساعة 8 صباحًا إلى الساعة 8 مساءً، يمكنك تحديدهم بشكل مستقل.

بالإضافة إلى ذلك، إذا حدّدت كلاً من برنامج التتبُّع ومدى توفّر الموظفين، يمكنك إرسال اقتراحات لطلب موظّف دعم مباشر لمطالبة المستخدمين بطلب موظفي الدعم المباشر إذا لم يتمكّن ممثّلو برامج التتبُّع من تلبية احتياجاتهم.

تحديث مدى توفُّر المراسلة

لتعديل مدى توفّر المراسلة، يمكنك إرسال طلب تصحيح باستخدام واجهة برمجة تطبيقات Business Communications API لتعديل الحقلين primaryAgentInteraction وadditionalAgentInteractions للوكيل.

عند تعديل هذه الحقول، يجب تضمين القيم لجميع الحقول في الكائن SupportedAgentInteraction. وتستبدل طلبات التحديث محتويات جميع الحقول التي تعدلها، بما في ذلك أي حقول فرعية. على سبيل المثال، إذا قدّمت طلبًا لإضافة مثيل إلى hours، عليك تضمين كل مثيلات hours السابقة أيضًا، وإلا سيتم استبداله.

المتطلبات الأساسية

قبل تحديث مدى توفُّر المراسلة، تحتاج إلى العناصر التالية:

  • المسار إلى مفتاح حساب خدمة مشروع Google Cloud Platform على جهاز التطوير
  • الوكيل name (مثلاً، "brands/12345/agents/67890")

    في حال عدم معرفة name للوكيل، يُرجى الاطّلاع على المقالة إدراج جميع الوكلاء لإحدى العلامات التجارية.

  • المناطق الزمنية لتوفُّر برنامج التتبُّع والأيام من الأسبوع والساعات

  • المناطق الزمنية للتوفر البشري وأيام الأسبوع والساعات

إذا كنت لا تعرف القيم primaryAgentInteraction وadditionalAgentInteractions الحالية، يمكنك الاطّلاع على الحصول على معلومات الوكيل.

إرسال طلب التحديث

لتعديل الوكيل، شغّل الأمر التالي. استبدِل المتغيرات بالقيم التي حدّدتها في المتطلبات الأساسية.

إذا كان لديك كل من برنامج التتبُّع ومدى توفُّر ميزة المراسلة البشرية، حدِّد مدى توفُّر برنامج التتبُّع في primaryAgentInteraction ومدى توفُّر المستخدم في حالة additionalAgentInteractions.

برنامج التتبُّع والإنسان


# This code updates the agent interaction of a bot and human representatives.
# Read more: https://developers.google.com/business-communications/business-messages/reference/business-communications/rest/v1/brands.agents/patch

# Replace the __BRAND_ID__ and __AGENT_ID__
# Make sure a service account key file exists at ./service_account_key.json

curl -X PATCH \
"https://businesscommunications.googleapis.com/v1/brands/__BRAND_ID__/agents/__AGENT_ID__?updateMask=businessMessagesAgent.primaryAgentInteraction,businessMessagesAgent.additionalAgentInteractions" \
-H "Content-Type: application/json" \
-H "User-Agent: curl/business-communications" \
-H "$(oauth2l header --json ./service_account_key.json businesscommunications)" \
-d '{
  "businessMessagesAgent": {
    "primaryAgentInteraction": {
      "interactionType": "BOT",
      "botRepresentative": {
        "botMessagingAvailability": {
          "hours": [
            {
              "startTime": {
                "hours": 20,
                "minutes": 0
              },
              "endTime": {
                "hours": 8,
                "minutes": 0
              },
              "timeZone": "America/Los_Angeles",
              "startDay": "MONDAY",
              "endDay": "SUNDAY"
            }
          ]
        }
      }
    },
    "additionalAgentInteractions": [
      {
        "interactionType": "HUMAN",
        "humanRepresentative": {
          "humanMessagingAvailability": {
            "hours": [
              {
                "startTime": {
                  "hours": 8,
                  "minutes": 0
                },
                "endTime": {
                  "hours": 20,
                  "minutes": 0
                },
                "timeZone": "America/Los_Angeles",
                "startDay": "MONDAY",
                "endDay": "SUNDAY"
              }
            ]
          }
        }
      }
    ]
  }
}'

برنامج التتبُّع فقط


# This code updates the primary agent interaction of a bot representative
# Read more: https://developers.google.com/business-communications/business-messages/reference/business-communications/rest/v1/brands.agents/patch

# Replace the __BRAND_ID__ and __AGENT_ID__
# Make sure a service account key file exists at ./service_account_key.json

curl -X PATCH \
"https://businesscommunications.googleapis.com/v1/brands/__BRAND_ID__/agents/__AGENT_ID__?updateMask=businessMessagesAgent.primaryAgentInteraction" \
-H "Content-Type: application/json" \
-H "User-Agent: curl/business-communications" \
-H "$(oauth2l header --json ./service_account_key.json businesscommunications)" \
-d '{
  "businessMessagesAgent": {
    "primaryAgentInteraction": {
      "interactionType": "BOT",
      "botRepresentative": {
        "botMessagingAvailability": {
          "hours": [
            {
              "startTime": {
                "hours": 20,
                "minutes": 0
              },
              "endTime": {
                "hours": 8,
                "minutes": 0
              },
              "timeZone": "America/Los_Angeles",
              "startDay": "MONDAY",
              "endDay": "SUNDAY"
            }
          ]
        }
      }
    }
  }
}'

بشرية فقط


# This code updates the primary agent interaction of a human representative
# Read more: https://developers.google.com/business-communications/business-messages/reference/business-communications/rest/v1/brands.agents/patch

# Replace the __BRAND_ID__ and __AGENT_ID__
# Make sure a service account key file exists at ./service_account_key.json

curl -X PATCH \
"https://businesscommunications.googleapis.com/v1/brands/__BRAND_ID__/agents/__AGENT_ID__?updateMask=businessMessagesAgent.primaryAgentInteraction" \
-H "Content-Type: application/json" \
-H "User-Agent: curl/business-communications" \
-H "$(oauth2l header --json ./service_account_key.json businesscommunications)" \
-d '{
  "businessMessagesAgent": {
    "primaryAgentInteraction": {
      "interactionType": "HUMAN",
      "humanRepresentative": {
        "humanMessagingAvailability": {
          "hours": [
            {
              "startTime": {
                "hours": 20,
                "minutes": 0
              },
              "endTime": {
                "hours": 8,
                "minutes": 0
              },
              "timeZone": "America/Los_Angeles",
              "startDay": "MONDAY",
              "endDay": "SUNDAY"
            }
          ]
        }
      }
    }
  }
}'

للتعرّف على خيارات التنسيق والقيمة، راجِع brands.agents.patch وSupportedAgentInteraction.