कीवर्ड नियम
Bird कीवर्ड कैटलॉग के साथ आता है, इसलिए जो प्राप्तकर्ता आपके इनबाउंड-सक्षम नंबरों में से किसी पर STOP का जवाब देता है, वह बिना किसी सेटअप के ऑप्ट आउट हो जाता है। START इसे उलट देता है। आपका अपना नियम उस दायरे के लिए Bird के डिफ़ॉल्ट को ओवरराइड करता है।
यह पेज बताता है कि Bird क्या पहचानता है, इनबाउंड संदेश का मिलान कैसे होता है, और शब्द कैसे बदलें या कीवर्ड कैसे जोड़ें। Keywords पेज इसका डैशबोर्ड समकक्ष है।

Bird डिफ़ॉल्ट रूप से क्या पहचानता है
नौ शब्द ऑप्ट-आउट दर्ज करते हैं:
stop, stop all, stopall, unsubscribe, cancel, end, quit, revoke, optout
दो इसे उलटते हैं: start और unstop।
मिलान पूरे संदेश पर होता है, सबस्ट्रिंग पर नहीं। चूँकि cancel और end कीवर्ड हैं, यह अंतर मायने रखता है: "cancel my 3pm delivery" एक सामान्य संदेश है, सहमति वापसी नहीं। अक्षर केस, एक्सेंट, दोहराए गए स्पेस और अंत का विराम चिह्न नज़रअंदाज़ किए जाते हैं, इसलिए Stop! और STOP दोनों मिलान करते हैं। शब्द से पहले या अंदर का विराम चिह्न नज़रअंदाज़ नहीं किया जाता, इसलिए #stop मिलान नहीं करता।
जहाँ कीवर्ड का मिलान नहीं होता
ग्रुप संदेश के अंदर कीवर्ड को छोड़ दिया जाता है, इसलिए कोई प्रतिभागी वहाँ जवाब देकर ऑप्ट आउट नहीं कर सकता। ग्रुप सदस्य के बताए गए ऑप्ट-आउट को अपने भेजने के लॉजिक में स्वयं लागू करें।
प्राथमिकता कब दर्ज होती है
वर्गीकरण whatsapp.received इवेंट के साथ चलता है, उससे पहले नहीं। इसलिए उस इवेंट को देखने वाला इंटीग्रेशन STOP को उसकी दर्ज प्राथमिकता बनने से पहले आते देख सकता है। अगर आपका हैंडलर इनबाउंड संदेश पर कुछ भेजकर प्रतिक्रिया करता है, तो इवेंट क्रम मानने के बजाय प्राप्तकर्ता के रिकॉर्ड दोबारा पढ़ें।
क्या लागू होता है, यह देखना
GET /v1/whatsapp/keyword-rules बताता है कि आपके नंबरों पर जवाबों को कैसे संभाला जाता है। बिना फ़िल्टर के, यह Bird का कैटलॉग आपके बनाए नियमों के साथ लौटाता है। country, waba, operation, या scope से इसे सीमित करें:
- scope=system Bird का कैटलॉग लौटाता है, जिसमें वह डिफ़ॉल्ट भी शामिल है जिसे आपका नियम ओवरराइड करता है।
- scope=workspace आपके अपने नियम लौटाता है।
const rules = await bird.whatsapp.keywordRules.list({ operation: "opt_out" });
for (const rule of rules.data ?? []) {
console.log(rule.scope, rule.effective_keywords);
}rules = client.whatsapp.keyword_rules.list(operation="opt_out")
for rule in rules.data or []:
print(rule.scope, rule.effective_keywords)rules, err := client.Whatsapp.KeywordRules.List(context.Background(), bird.WhatsappKeywordRulesListParams{
Operation: "opt_out", // omit for both operations, Bird's rules and your own
})
if err != nil {
log.Fatal(err)
}
for _, rule := range rules.Data {
fmt.Println(rule.Scope, rule.EffectiveKeywords)
}$rules = $bird->whatsapp->keywordRules->list(['operation' => 'opt_out']);
foreach ($rules->getData() ?? [] as $rule) {
echo $rule->getScope(), ' ', implode(',', $rule->getEffectiveKeywords() ?? []), PHP_EOL;
}bird whatsapp keyword-rules listcurl "https://us1.platform.bird.com/v1/whatsapp/keyword-rules?operation=opt_out" \
-H "Authorization: Bearer $BIRD_API_KEY"नियम सबसे विशिष्ट पहले लौटते हैं, और यही वह क्रम है जिसमें इनबाउंड संदेश का उनसे मिलान होता है। हर नियम में effective_keywords होता है: उस ऑपरेशन और देश के लिए Bird का सेट, और जो कुछ आपने जोड़ा है।
बिना country वाले आपके नियम के लिए, effective_keywords Bird का विश्वव्यापी सेट दिखाता है, क्योंकि नियम में कोई देश नहीं है और संदेश आने तक भेजने वाले का देश अज्ञात रहता है। वह नियम भेजने वाले के देश के लिए Bird के सेट से मिलान करता है, जो बड़ा सेट हो सकता है। ठीक-ठीक देखने के लिए कि वे भेजने वाले किससे मिलान करते हैं, अपने नियम पर country सेट करें।
country भेजने वाले का देश है, जो उनके अपने फ़ोन नंबर से निकाला जाता है, न कि जिस नंबर पर उन्होंने संदेश भेजा। यही वह देश सिग्नल है जो WhatsApp भेजता है। बिज़नेस-स्कोप्ड यूज़र ID से पहचाने गए भेजने वाले के पास कोई देश नहीं होता, इसलिए उनका संदेश देश-स्कोप्ड नियमों को छोड़कर विश्वव्यापी नियम से मिलान करता है।
जवाब बदलना
Bird के डिफ़ॉल्ट जवाब सही हैं लेकिन सामान्य हैं। अपने नाम से जवाब देने के लिए एक नियम बनाएँ:
const rule = await bird.whatsapp.keywordRules.create({
operation: "opt_out",
country: "US", // the SENDER's country, from their own number
reply: "You're off the list. ACME Courier won't message you again.",
});
// effective_keywords is Bird's set plus any of your own.
console.log(rule.id, rule.effective_keywords);rule = client.whatsapp.keyword_rules.create(
operation="opt_out",
country="US", # the SENDER's country, from their own number
reply="You're off the list. ACME Courier won't message you again.",
)
# effective_keywords is Bird's set plus any of your own.
print(rule.id, rule.effective_keywords)rule, err := client.Whatsapp.KeywordRules.Create(context.Background(), bird.WhatsappKeywordRulesCreateParams{
Operation: "opt_out",
Country: bird.String("US"), // the SENDER's country, from their own number
Reply: bird.String("You're off the list. ACME Courier won't message you again."),
})
if err != nil {
log.Fatal(err)
}
// EffectiveKeywords is Bird's set plus any of your own.
fmt.Println(rule.Id, rule.EffectiveKeywords)$rule = $bird->whatsapp->keywordRules->create(
(new WhatsAppKeywordRuleCreate())
->setOperation('opt_out')
->setCountry('US')
->setReply("You're off the list. ACME Courier won't message you again."),
);
// getEffectiveKeywords() is Bird's set plus any of your own.
echo $rule->getId(), ' ', implode(',', $rule->getEffectiveKeywords() ?? []);bird whatsapp keyword-rules create \
--country US \
--keywords 'no more texts' \
--keywords 'remove me' \
--operation opt_out \
--reply "You're off the list. ACME Courier won't message you again." \
--waba 102290129340398curl -X POST https://us1.platform.bird.com/v1/whatsapp/keyword-rules \
-H "Authorization: Bearer $BIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"operation":"opt_out","country":"US","reply":"You'"'"'re off the list. ACME Courier won'"'"'t message you again."}'आपका नियम उस दायरे के लिए Bird के जवाब को बदल देता है और Bird के कीवर्ड रखता है। आपके keywords प्रतिस्थापन नहीं बल्कि अतिरिक्त हैं, इसलिए बाद में Bird जो कीवर्ड जोड़ता है वह आपकी ओर से बिना किसी बदलाव के मिलान करना शुरू कर देता है।
ऑप्ट-आउट दर्ज करते हुए कुछ न भेजने के लिए, नियम बनाते समय reply छोड़ दें। किसी मौजूदा नियम को शांत करने के लिए, नीचे दिए गए अपडेट पर JSON बॉडी में reply को null सेट करें; CLI फ़्लैग null नहीं ले सकता।

अपने कीवर्ड जोड़ना
// Omitting keywords leaves the set alone; an empty array clears your additions
// back to Bird's. reply: null switches the auto-reply off and still records
// the opt-out.
const rule = await bird.whatsapp.keywordRules.update("wkr_01m2kj8x4te9p0rr7e5w2n1abc", {
keywords: ["no more texts", "remove me"],
});
console.log(rule.effective_keywords);# Omitting keywords leaves the set alone; an empty list clears your additions
# back to Bird's.
rule = client.whatsapp.keyword_rules.update(
"wkr_01m2kj8x4te9p0rr7e5w2n1abc", keywords=["no more texts", "remove me"]
)
print(rule.effective_keywords)// Omitting keywords leaves the set alone; an empty slice clears your
// additions back to Bird's.
rule, err := client.Whatsapp.KeywordRules.Update(context.Background(),
"wkr_01m2kj8x4te9p0rr7e5w2n1abc", bird.WhatsappKeywordRulesUpdateParams{
Keywords: []string{"no more texts", "remove me"},
})
if err != nil {
log.Fatal(err)
}
fmt.Println(rule.EffectiveKeywords)// Omitting keywords leaves the set alone; an empty array clears your additions
// back to Bird's.
$rule = $bird->whatsapp->keywordRules->update(
'wkr_01m2kj8x4te9p0rr7e5w2n1abc',
(new WhatsAppKeywordRuleUpdate())->setKeywords(['no more texts', 'remove me']),
);
echo implode(',', $rule->getEffectiveKeywords() ?? []);bird whatsapp keyword-rules update <id> \
--keywords 'no more texts' \
--reply "You're off the list. ACME Courier won't message you again."curl -X PATCH https://us1.platform.bird.com/v1/whatsapp/keyword-rules/wkr_01m2kj8x4te9p0rr7e5w2n1abc \
-H "Authorization: Bearer $BIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"keywords":["no more texts"]}'keywords छोड़ने पर आपके अतिरिक्त कीवर्ड वैसे ही रहते हैं। खाली array भेजने पर वे Bird के सेट पर वापस आ जाते हैं।
नियम का दायरा और डुप्लिकेट
एक नियम waba के साथ एक WhatsApp Business Account तक, country के साथ एक भेजने वाले के देश तक, दोनों तक, या किसी तक भी सीमित नहीं हो सकता। ऑपरेशन, देश और अकाउंट के हर संयोजन के लिए आपके पास एक नियम होता है। उसी संयोजन के लिए दूसरा लिखने पर डुप्लिकेट त्रुटि आती है।
Bird ऐसे नियम को अस्वीकार करता है जो stop को opt_in से जोड़ता है, चाहे वह शब्द Bird के कैटलॉग से आया हो या आपके किसी अन्य नियम से, ताकि कोई ऑप्ट-आउट शब्द सहमति देने के लिए नहीं बनाया जा सके।
नियम हटाना
आपका नियम हटाने पर वह दायरा मिलान क्रम में अगले नियम को मिलता है, जो हमेशा आपका नहीं होता। क्रम इस प्रकार है:
- अकाउंट और देश के लिए आपका नियम।
- अकाउंट के लिए आपका नियम।
- देश के लिए आपका नियम।
- भेजने वाले के देश के लिए Bird का नियम।
- आपका विश्वव्यापी नियम।
- Bird का विश्वव्यापी नियम।
किसी देश के लिए आपका नियम हटाने पर वह दायरा आपके विश्वव्यापी नियम से पहले उस देश के लिए Bird के नियम को मिलता है:
// The next rule in the ladder answers the scope, which is another rule of yours if you hold a less specific one; STOP never stops working.
await bird.whatsapp.keywordRules.delete("wkr_01m2kj8x4te9p0rr7e5w2n1abc");# The next rule in the ladder answers the scope, which is another rule of yours if you hold a less specific one; STOP never stops working.
client.whatsapp.keyword_rules.delete("wkr_01m2kj8x4te9p0rr7e5w2n1abc")if err := client.Whatsapp.KeywordRules.Delete(context.Background(),
"wkr_01m2kj8x4te9p0rr7e5w2n1abc"); err != nil {
log.Fatal(err)
}// The next rule in the ladder answers the scope, which is another rule of yours if you hold a less specific one; STOP never stops working.
$bird->whatsapp->keywordRules->delete('wkr_01m2kj8x4te9p0rr7e5w2n1abc');bird whatsapp keyword-rules delete <id> --yescurl -X DELETE https://us1.platform.bird.com/v1/whatsapp/keyword-rules/wkr_01m2kj8x4te9p0rr7e5w2n1abc \
-H "Authorization: Bearer $BIRD_API_KEY"नियम हटाने से STOP काम करना बंद नहीं करता। यह शब्दों और कीवर्ड सेट को उस क्रम में अगले नियम पर लौटा देता है।
अगले कदम
- प्राथमिकताएँ: कीवर्ड से बनने वाले रिकॉर्ड, और उनमें से किन्हें आप उलट सकते हैं।
- दमन: वे पते जिन्हें आपका वर्कस्पेस सीधे ब्लॉक करता है।
- SMS के लिए ऑप्ट-आउट और कीवर्ड: दूसरे चैनल पर वही तंत्र, जिसमें help और campaign कीवर्ड भी शामिल हैं।
संबंधित संसाधन
इस विषय के लिए डॉक्यूमेंटेशन, गाइड और उदाहरणों के साथ आगे बढ़ें। संसाधन अंग्रेज़ी में हैं।
गाइड देखेंConnecting WhatsApp to Bird: from buying a number to a live channelकॉन्सेप्ट समझेंWhat is the 24-hour customer service window on WhatsApp?टूल का उपयोग करेंWhatsApp message builderक्षमता जानेंWhatsApp
अभ्यास करें और इम्प्लीमेंटेशन ब्रीफ़ पाएँ