blank-aquamarine
blank-aquamarine16mo ago

Intents seem not to trigger through the Dialog API

When querying the /interact endpoint with payload
{
"type": "text",
"payload": "Some message"
}
{
"type": "text",
"payload": "Some message"
}
It wont actually trigger any intents
31 Replies
blank-aquamarine
blank-aquamarineOP16mo ago
@Daniel @NiKo | Voiceflow
Tico | Voiceflow Assistant
The issue you're experiencing might be due to the way you're sending the request. When you're sending a text request to the /interact endpoint of the Dialog API, it's important to note that the payload should contain the user's response or message. However, this doesn't directly trigger an intent. Instead, it's processed by the Dialog Manager API which then advances the conversation based on the Voiceflow project's design. If you want to directly trigger an intent, you should send an intent request. The payload for an intent request should contain the name of the intent you want to trigger. Here's an example of how to structure an intent request:
{
"type": "intent",
"payload": {
"name": "YourIntentName",
"entities": []
}
}
{
"type": "intent",
"payload": {
"name": "YourIntentName",
"entities": []
}
}
In this example, replace "YourIntentName" with the name of the intent you want to trigger. The entities array can be left empty or filled with any entities relevant to your intent. Remember, the Dialog Manager API responds with an array of "traces" which represent the overall response of your project. Each trace is produced by a block on your Voiceflow project. The type of response traces can vary, including 'speak', 'visual', etc. If you're still having trouble triggering intents, it might be helpful to review your Voiceflow project's design to ensure that it's set up to handle the intents you're trying to trigger.
blank-aquamarine
blank-aquamarineOP16mo ago
Not relevant @Tico | Voiceflow Assistant ^^ Nice try though!
equal-aqua
equal-aqua16mo ago
Wait really? What does it return?
blank-aquamarine
blank-aquamarineOP16mo ago
Just continues the flow, does not find the intent, though it does on the prod chat version
equal-aqua
equal-aqua16mo ago
Do you mean the in app prototype? If it does it on the prod chat then that’s the expected behaviour in production. Are you still looking for a way to generate buttons -> on button press pass the utterance? I haven’t heard from team so I’m sharing around more
blank-aquamarine
blank-aquamarineOP16mo ago
What im expecting is that intents are always being listened to (be it either button OR text input), so if there is an intent End conversation and the user types in to the chat "I'd like to end the conversation please", that it would trigger the End Conversation intent. Is that not the case?
equal-aqua
equal-aqua16mo ago
Yes that’s the case - I guess I’m a bit confused 1. You’re looking to generate a button 2. If a user presses that button then send the title as an utterance into the conversation But for the following (in production specifically) You’ve found that 1. Buttons generated by functions do not follow this pattern 2. Carousel buttons do not follow this pattern 3. Sending a standard text request doesn’t follow this pattern(?) Cc @SuperZooper
fascinating-indigo
fascinating-indigo16mo ago
I think I understand what Mike is looking for, differnt to just a button. It's just like inconsistent behaviour I think, in the way that sending a message in the normal text chat automatically listens for intents (and lets you jump), but that these chat messages don't allow that aledgedly. Looking into it but this is supprising, i used intents for my minecraft project
fascinating-indigo
fascinating-indigo16mo ago
No description
No description
No description
fascinating-indigo
fascinating-indigo16mo ago
this is an example i have set up with intents that jumps so yes it's capturing the intent from the conversation @MikeG not quite sure what your project is set up as so yes 💯 with what Daniel said, I've found that the intents are triggered through the Dialogue API
blank-aquamarine
blank-aquamarineOP16mo ago
Interesting.. This came from one of our user: https://discord.com/channels/1184257840756559933/1228002544568107150/1238487873406242950
'action' => [
"type": "text",
"payload": "How much is this?",
],
'config' => [
'tts' => false,
'stripSSML' => true,
],
'action' => [
"type": "text",
"payload": "How much is this?",
],
'config' => [
'tts' => false,
'stripSSML' => true,
],
@SuperZooper @Daniel do you think its user error or is there something wrong in my configuration?
blank-aquamarine
blank-aquamarineOP16mo ago
No description
correct-apricot
correct-apricot16mo ago
I've been trying to make it work till now, but no result. We are on tight deadlines with this project, and this is really slowing us down. @Daniel Would appreciate any assistance, thank you.
equal-aqua
equal-aqua16mo ago
Hm yea @MikeG can you elaborate more on this? What Alex showed is the expected behaviour. But you're saying that its not occuring?
blank-aquamarine
blank-aquamarineOP16mo ago
Hey @Daniel, ye, as seen from the screenshot above, the react-chat and dialog API calls somehow seem to respond differently to the same question. The react-chat seemingly triggering the intent, where-as the one from whatsapp using the dialog API does not You're saying the dialog API should definitely trigger the intent given the payload referenced in the reply?
equal-aqua
equal-aqua16mo ago
Can you share the project with us so we can try and replicate? DM me
blank-aquamarine
blank-aquamarineOP16mo ago
@mutiso_ is that possible?
correct-apricot
correct-apricot16mo ago
I already did, a while back.
blank-aquamarine
blank-aquamarineOP16mo ago
Can you share it with Daniel @mutiso_ ?
correct-apricot
correct-apricot16mo ago
@MikeG That's what I'm saying, already did a while back, shared the .vf file @MikeG I'm still stuck with the same issue, but getting no response from @Daniel
equal-aqua
equal-aqua16mo ago
oops didnt see the DM - was in my others inbox
fascinating-indigo
fascinating-indigo16mo ago
Hi @mutiso_, I'm talking alook at the project you sent and i'm not sure if it's the right one / what's going on here.
No description
No description
blank-aquamarine
blank-aquamarineOP16mo ago
@mutiso_ have you tried the suggestion on the FlowBridge discord; resetting your user state through the transcripts page? cc @Daniel for visibility
fascinating-indigo
fascinating-indigo16mo ago
I've been testing on my end and I'm not able to replicate the issues with intent classification through the DMAPI
blank-aquamarine
blank-aquamarineOP16mo ago
ye someone gave a suggestion on the FlowBridge discord that might be helpful
fascinating-indigo
fascinating-indigo16mo ago
could you share what it is here, just out of curisoity? also just to recap though, the issue isn't with the DM API and probably has to do with flowbridge's interface correct?
blank-aquamarine
blank-aquamarineOP16mo ago
It's a not a bug but a feature haha! Due to how FlowBridge & Voiceflow works, when a user initiates the conversation, the user state is created on VF. Due to social channels, the state remains in existence forever, or until an end step is reached because the session ID is the messenger conversation ID/Whatsapp number. So if you're testing, and thus creating that state, if you make any changes to your project, they won't be picked up as your session will still be in the old version until you either reach an end step or reset the user state on Voiceflow, allowing the new state to be generated on the Voiceflow side So potentially, it could be that @mutiso_ was testing, changed his build to have intents, but these are not triggering due to his user state still being in that old version of the build
fascinating-indigo
fascinating-indigo16mo ago
ah yes i see, good explanation thank you! and yes i hope that makes sense mutiso i recommend always specificying your verison ID explicitly
blank-aquamarine
blank-aquamarineOP16mo ago
that's fair, i'll mention it in the documentation we're building out
correct-apricot
correct-apricot16mo ago
Done that Still doesn't work. Finally is working. Resetting the user session didn't work, but hitting the end block did work, amazing thank you so much. Thank you @MikeG

Did you find this page helpful?