cancel
Showing results for 
Search instead for 
Did you mean: 

How to trigger a skill from custom javascript logic?

Former Member
0 Kudos

Hello everybody, I hosted a custom webchat on my website. Here I have a web chat instance with which I can access the entire functionality of the SAP web chat. With the following function I would like to trigger a skill in my SAP CAI project. However, I don't know what to enter in value to trigger my skill.

Accepted Solutions (0)

Answers (1)

Answers (1)

dtephan
Participant
0 Kudos

Hi Philipp,

if I understand correctly you want to render a button in your webchat client with JavaScript that renders a button of type trigger_skill to invoke a dedicated skill on user interaction. This feature is unfortunately not designed to work in that way. Let me explain: From a pure payload perspective the "value" of a trigger_skill button needs to be a UUID. However, this UUID is created in the backend once a button of type trigger_skill is returned to the frontend. On the next step, the backend will also only accept UUID that were generated by itself before.

An alternative could be a button of type postback which simply sends a message to the backend. This of course has the drawback that the message will be analyzed by natural language understanding and the skill needs to use the correct set of triggers.

Hope I could help, best regards,
Stephan

Former Member
0 Kudos

Hi Stephan,

thanks for the fast respond! Is there a prospect that the feature will be implemented in the future?

Best wishes Philipp

dtephan
Participant
0 Kudos

Hi Philipp,

as far as I'm aware of nothing like that is planned currently, but I will forward it as an idea to our product team.

Best,
Stephan

Former Member
0 Kudos

Hello Stephan,

great, thank you!

best regards Philipp