Virtual Agent - full API for sn_cs.SinglePartOutMsg and full API for sn_cs.MultiPartOutMsg.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2019 05:27 AM
Hello everyone,
I`m really interested in multioutput messages connected with below functions example from Virtual Agent designer. Actually, there is no API documentation as mentioned in the comment. There is nothing more than that.
I need that for my client to output multi messages bubbles instead of one. We can use MultiPartOutMsg function for that, but by default, there is a button "Click for More!" between them. My client wanted to have a predefined time delay between them instead of that button. So I think there could be some other function than multiOutMsg.setNavigationLabel('Click for More'); or solution how to manage that in another way.
/***************************************************************
YOU CAN OUTPUT A SinglePartOutMsg (see full API for sn_cs.SinglePartOutMsg),
LIKE THIS:
var singleOutMsg = new sn_cs.SinglePartOutMsg();
singleOutMsg.setTextPart('text part');
return singleOutMsg;
****************************************************************/
/***************************************************************
OR YOU CAN OUTPUT A MultiPartOutMsg (see full API for sn_cs.MultiPartOutMsg),
LIKE THIS:
var multiOutMsg = new sn_cs.MultiPartOutMsg();
multiOutMsg.setNavigationLabel('Click for More');
multiOutMsg.addPlainTextPart('text part 1');
multiOutMsg.addPlainTextPart('text part 2');
return multiOutMsg;
****************************************************************/
/***************************************************************
* NOTE: You can include conditional logic when building the
* output content. For example, if constructing a sn_cs.MultiPartOutMsg
* then you might want to add 3 parts under condition (A) but 7 parts
* under condition (B).
*
* HOWEVER, do NOT include conditional logic that varies the output TYPE.
* That is, do NOT include a condition that might return either a
* sn_cs.SinglePartOutMsg under condition (A) but returns a
* sn_cs.MultiPartOutMsg under condition (B).
****************************************************************/
Thank you in advance!
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2019 12:38 AM
Hi Adrian,
This should help you.
https://community.servicenow.com/community?id=community_question&sys_id=cc26056fdb72af409540e15b8a9619c3
Please mark this comment as Correct Answer/Helpful if it helped you.
Cheers,
Hardit Singh