Hi guys, I’m new to botpress and have no programming experience, but I dove in and am making a bot that needs to take an answer/references from two workflows, run a calculation combining the two, and give an output.
Referencing 1 workflow is pretty easy, but I have no clue how to reference two at once. They are both number outputs.
I’ve been using the AI Task function to do the calculations and have been pretty successful, but absolutely stumped on this…please help
f
fresh-fireman-491
03/10/2024, 6:46 AM
Hey there.
The simplest way to access a variable across multiple workflow would be to make it have the user scope instead of workflow.
https://youtu.be/ep6ZtVrxxv4?si=DvtQn4wDkW0b8ye1▾
a
adamant-painter-4637
03/10/2024, 8:49 PM
ok i'll look into this more. Thank you for the help! not sure I understand how this would work yet but I'll try my best 👍
adamant-painter-4637
03/10/2024, 9:51 PM
for some reason the user variable doesnt function the same way as a workflow variable (probably a "duh" but I don't get it) it doesnt just give the result of the calculation as a workflow variable does when i save into it and reference it...could the problem be that i'm trying to access 2 different type of variables? one is a calculation the other is an input from a user that is a "custom number" to run in the calculation. these would then be combines to run the final calculation. its basically a very specific profit calculator.
f
fresh-fireman-491
03/11/2024, 5:06 AM
You have to make sure that they are set to the number type