लोगों को आपके एजेंट से बातचीत करने की अनुमति देने से पहले, आपको Business Messages में अपने एजेंट की मैसेजिंग उपलब्धता सेट करनी होगी.
अगर कोई व्यक्ति, एजेंट के उपलब्ध होने के दौरान उसे मैसेज करता है, तो एजेंट उसे वेलकम मैसेज और बातचीत शुरू करने के लिए कुछ सुझाव भेजता है. अगर बातचीत, एजेंट के उपलब्ध न होने के दौरान शुरू होती है, तो लोगों को एजेंट का ऑफ़लाइन मैसेज दिखता है. इन मैसेज के बारे में ज़्यादा जानने के लिए, बातचीत शुरू करना लेख पढ़ें.
बॉट और एजेंट की उपलब्धता
बॉट और एजेंट की उपलब्धता अलग-अलग सेट की जा सकती है.
अगर आपके एजेंट के लिए मैसेज कंपोज़ करने की प्रोसेस को किसी भी तरह से ऑटोमेट किया गया है, तो बॉट की मैसेजिंग उपलब्धता सेट करें. भले ही, ऑटोमेशन की मदद से उपयोगकर्ताओं को यह बताया जा रहा हो कि वे लाइन में किस नंबर पर हैं. इसके अलावा, अगर कोई ऐसा एजेंट है जो एनएलपी (नैचुरल लैंग्वेज प्रोसेसिंग) का इस्तेमाल करता है और उसके पास उपयोगकर्ताओं की जानकारी का डाइनैमिक ऐक्सेस है, तब भी बॉट की मैसेजिंग उपलब्धता सेट करें.
अगर आपको Google के मैनेज किए जाने वाले एंट्री पॉइंट पर कोई एजेंट लॉन्च करना है, तो एजेंट की उपलब्धता सेट करना ज़रूरी है. इनमें, जगह के हिसाब से एंट्री पॉइंट और स्थानीय एंट्री पॉइंट के अलावा अन्य एंट्री पॉइंट शामिल हैं. हालांकि, Google Ads के एंट्री पॉइंट के लिए यह ज़रूरी नहीं है. एजेंट की उपलब्धता के लिए, हफ़्ते के सिर्फ़ उन दिनों और घंटों की जानकारी दें जब आपके पास सवालों के जवाब देने के लिए लाइव एजेंट उपलब्ध हों.
अगर बॉट प्रतिनिधि 24 घंटे उपलब्ध हैं, लेकिन एजेंट प्रतिनिधि सुबह 8 बजे से रात 8 बजे तक उपलब्ध हैं, तो दोनों की उपलब्धता अलग-अलग सेट की जा सकती है.
इसके अलावा, अगर आपने बॉट और एजेंट, दोनों की उपलब्धता सेट की है, तो आप लाइव एजेंट के अनुरोध के सुझाव भेज सकते हैं. इससे, अगर बॉट प्रतिनिधि लोगों की ज़रूरतें पूरी नहीं कर पाते हैं, तो उन्हें लाइव एजेंट का अनुरोध करने के लिए कहा जा सकता है.
मैसेजिंग उपलब्धता की जानकारी अपडेट करना
मैसेजिंग उपलब्धता की जानकारी अपडेट करने के लिए, Business Communications API की मदद से PATCH अनुरोध करें. इससे, एजेंट के primaryAgentInteraction और additionalAgentInteractions फ़ील्ड अपडेट हो जाएंगे.
इन फ़ील्ड को अपडेट करते समय, आपको SupportedAgentInteraction ऑब्जेक्ट के सभी फ़ील्ड के लिए वैल्यू शामिल करनी होंगी. अपडेट के अनुरोध से, आपके एडिट किए गए सभी फ़ील्ड का कॉन्टेंट बदल जाता है. इसमें चाइल्ड फ़ील्ड भी शामिल हैं. उदाहरण के लिए, अगर आपको hours में कोई इंस्टेंस जोड़ना है, तो आपको पिछले सभी hours इंस्टेंस भी शामिल करने होंगे. ऐसा न करने पर, आपका अपडेट उन्हें बदल देगा.
ज़रूरी शर्तें
मैसेजिंग उपलब्धता की जानकारी अपडेट करने से पहले, आपको इन चीज़ों की ज़रूरत होगी:
- डेवलपमेंट मशीन पर, आपके GCP प्रोजेक्ट के सेवा खाते की कुंजी का पाथ
एजेंट का
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 देखें.