Function for transitions with RAW condition

#1

Hi guys,
I’m migrating a bot from version 10 to 11.

In version 10, as raw condition, I used an action that returned true or false.

I’m not able to imitate this in version 11. I tried with {actionName} and with {module-name} / {actionName}

Can it be done with an action or should I declare it in another way?

Thanks in advance!

#2

Hi @lmoralejo,

You have to use Memory to store the result of your function and then access it in your raw condition with session, user or temp.

So in you flow, you’d have a node that call your action, then you’d store the result in memory and access it in your transition. You can also directly assign the result to memory from your action.

Let’s say this is your action:

// Store the result directly in temp memory
temp.result = someCondition

Hope this helps!

1 Like
#3

Thanks @rndlaine! I’ll try!