function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Arthur AlmeidaArthur Almeida 

Einstein Bot - why cannot i use two action apex

I have this process:

User-added image

My Welcome, when the process starts, there is an action that calls an apex to generate, save and return the user id to the bot. Then, the user enters the product name, and creates a collection of intentions and works.

My welcome:

User-added image

But if the bot gets confused, there is a rule, in which the user can try to enter the product name 3 times. For this logic we have a handle called apex.

My confused:

User-added image

But, for some reason, this second action does not work, only the first, in My Welcome. Why doesn't my second action, in confuse, work?

If I take my first action, and put a false idUser value, it works.

Why, when I put two actions in my process, the bot break?

Here is my log:

User-added image

Watch this, after transfer to confused, he doesn't invokes my apex, he redirect to Error Handling.

Please, help me!
Best Answer chosen by Arthur Almeida
Arthur AlmeidaArthur Almeida
the problem is because the apex is waiting for an Integer and the bot sends a Number, change all for string/text, and works.