How do I send an intent from the Chat Deploy Code

For the Chat Widget Web Deploy code, is there a line of code we can add that inserts a specific intent so that a user is taken directly into a specific journey?

With other vendors I can send an intent within the deploy code so that a user on a particular web page is taken to a specific part of a bot flow rather than starting from the beginning every time.

How do I achieve this with yellow?

@chris_holt You can trigger a specific journey by passing the journey slug. Checkout the following documentation for details - Customize chat bot using functions |

Thanks @akshay_bhat, so I’ve tried both the flow slug & the name, neither seem to be working & I’ve followed the code letter by letter, it looks fairly simple.

I’ve tried with both Live & Dev just to be sure

I’ve tried:

I’m not sure what I am doing wrong, the bot always starts at the Welcome flow.

And the flow example

HI @chris_holt I can see you have added triggerJourney inside the payload, can you please add triggerJourney outside the payload and try

Hi @vaibhav.sahu what would that look like please? I just followed the example from your knowledge site.

I have found the launch from URL option as part of my Studio training & that works as a nice alternative, but it would be handy to get this right as well.

Hi, @chris_holt In the above screenshot you can see i have sample payload with name:Vaibhav Sahu and I passed sample triggerJourney outside the payload.
The same way you can do with your script as well

1 Like

Thanks @vaibhav.sahu that works perfectly once I got the {} in the right order / quantity.

Can the KB article be updated to reflect this solution?

1 Like

@Bhargavi_Chinnappa please update the documentation