Dialogflow中基于deviceType实体值路由至对应follow-up Intent的咨询
Absolutely! You totally can route the conversation to the corresponding follow-up Intent based on the user's device type response—here's how to make this work (I’ll assume you’re using Dialogflow, since it’s the standard tool for Intent/follow-up setups like yours):
Step 1: Configure Follow-up Intent Conditions
This is the key part that ties the device type value to the right follow-up:
- For your Android follow-up Intent:
In the "Condition" field (found just below the Training Phrases section), enter:
Note: Match the case to what your entity expects—if your entity accepts lowercase "android", use that instead, or enable case insensitivity for the entity.deviceType = "Android" - For your iOS follow-up Intent:
Set its condition to:
Again, adjust case if your entity uses "ios" instead.deviceType = "iOS"
Step 2: Verify Entity Setup
Make sure your deviceType entity is configured to catch all relevant user inputs:
- Add synonyms like "android", "Android", "phone" (if applicable) to map to the "Android" entity value.
- For iOS, include synonyms like "iOS", "ios", "iPhone", "Apple" to ensure all user variations are captured correctly.
Step 3: Test the Flow
Once everything is set up:
- User sends: "How do I setup your app?" → The main "Setup" Intent triggers, and your prompt
Can you tell me the device type?is sent. - User replies with "iOS" or "Android" → The
deviceTypeentity is captured, and Dialogflow automatically routes the conversation to the follow-up Intent whose condition matches the entity value.
If you’re using a different NLP platform (like Amazon Lex, Watson Assistant, etc.), the core logic stays the same: after collecting the deviceType entity in the main Intent, add a routing rule that directs the conversation to the appropriate follow-up based on the entity’s value.
内容的提问来源于stack exchange,提问作者Matheswaran Kanagarajan

