https://discord.gg/botpress logo
#🤝help
Capture cancellation settings
# 🤝help
e

early-train-33247

06/12/2023, 7:17 AM
1. Is there a way to change the choices for the cancelling confirmation? My bot is in Portuguese, but the options show up as Yes and No. 2. When choosing yes, the capture just starts over - even with the 'on failure' transition disabled 3. We should be able to specify a custom transition for cancellations, just like there is one for failures (On failure, On cancellation) - is it possible at the moment? Cheers
a

acceptable-kangaroo-64719

06/12/2023, 10:19 AM
Hey @early-train-33247, there's not an option for custom cancellation behaviors, though you're right that it should be there. We can make a post on #1111026806254993459 about this. In the meantime, a workaround would be to build this behavior manually in a flow. Essentially you'd have your capture card with retries set to 0 and a failure condition that goes to another node where it listens for a "canecl" type inline intent. Then, if they want to cancel they can go to another capture card with any choice. Otherwise, a separate retry counter is incremented and they return back to the first capture card. It's a lot of nodes, but you would be able to get that behavior!
e

early-train-33247

06/12/2023, 11:19 AM
Alright this seems doable. I will try it out and let you know! Thanks
I managed to create a reprompt node like this, it works well
i am thinking of creating a workflow to abstract and reuse it across the bot. Do you think the response time will be affected much?
And also, what is the order of execution here? The capture checks if the user input is one of the choices, then proceeds to check all the intents and only if no intent is matched, the failure transition is triggered?
a

acceptable-kangaroo-64719

06/12/2023, 1:34 PM
I don't think so, no. You've got the right idea- abstracting this workflow and refrencing it in other places is the best practice.
e

early-train-33247

06/12/2023, 1:34 PM
alright, nice
a

acceptable-kangaroo-64719

06/12/2023, 1:35 PM
Typically execution is top-down, yes. Not sure why "on failure" is on top here, it ought to execute last like you describe.
e

early-train-33247

06/12/2023, 1:35 PM
yes that's just a layout issue
so the intent's below the capture card will never be triggered then?
a

acceptable-kangaroo-64719

06/12/2023, 1:36 PM
let me do a quick test to verify that
e

early-train-33247

06/12/2023, 1:36 PM
since everything that doesn't resemble one of the choices will trigger failure
okay]
a

acceptable-kangaroo-64719

06/12/2023, 1:39 PM
You probably want to not have a failure condition, actually.
e

early-train-33247

06/12/2023, 1:39 PM
because of the intent bug that's out there there is no way to be sure right now haha
i see
a

acceptable-kangaroo-64719

06/12/2023, 1:39 PM
I think your target use case is more like the second picture. So it seems like the displayed order-of-operation is correct. If there is a failure to extract, that triggers first of all
e

early-train-33247

06/12/2023, 1:39 PM
so i should put these intents in the reprompt then
a

acceptable-kangaroo-64719

06/12/2023, 1:40 PM
I reckon so
e

early-train-33247

06/12/2023, 1:40 PM
or use the second approach
okay, i will test them
thanks a lot
How do you think the fix for this issue will look like?
in the platform i mean
i am trying to think long term here because when you release an improvement i will probably have to refactor the whole bot
I believe a "Add transition to handle cancellation" setting would help
a

acceptable-kangaroo-64719

06/12/2023, 1:44 PM
I'm not entirely convinced that this is a bug
Oh that
that is definitely something that should be added
e

early-train-33247

06/12/2023, 1:45 PM
yeah, by issue i mean the need for a workaround
okay then
a

acceptable-kangaroo-64719

06/12/2023, 1:46 PM
I lean towards adding choice configuration to the "confirm cancellation" option
so that when it is checked, you can modify the button values
like you can when you make choices normally
e

early-train-33247

06/12/2023, 1:46 PM
Yeah that would be a lot easier
leaving the reprompt for the failure
a

acceptable-kangaroo-64719

06/12/2023, 1:46 PM
I'll make a post over in #1111026806254993459
e

early-train-33247

06/12/2023, 1:47 PM
perfect, appreciate it
a

acceptable-kangaroo-64719

06/12/2023, 1:59 PM
If you'd like to upvote it, the request is here https://discord.com/channels/1108396290624213082/1111026806254993459
38 Views