getting error org.mozilla.javascript.InterpretedFunction@7bc3a32d
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2024 12:52 PM - edited 12-04-2024 01:24 PM
Hi, I created a script in a 'script response activity in the virtual agent designer' and all of a sudden it started giving me this error message:
org.mozilla.javascript.InterpretedFunction@7bc3a32d
here is my code
NOTE: this are the values for 2 of the variables:
vaInputs.pickedfrommenu=true
vaInputs.get_issue_title='vpn'
function execute() {
var inputSearch;
var search_term;
// Check if the search text is empty
if (vaInputs.pickedfrommenu === true) {
// If empty means the user selected the topic from the Menu,so, we need to ask the user for a description of the issue, for that use a predefined issue title
vaVars.searchScript = vaInputs.get_issue_title;
inputSearch = vaVars.searchScript;
} else {
// Otherwise, use the search text provided by the user
inputSearch = vaSystem.getSearchText();
}
// Convert the search term to lowercase
search_term = inputSearch.toLowerCase();
vaInputs.searchword = search_term;
// Determine if the search term matches any of the predefined keywords
vaInputs.has_guide = (
search_term.includes('outlook') ||
search_term.includes('email') ||
search_term.includes('vpn') ||
search_term.includes('okta') ||
search_term.includes('security') ||
search_term.includes('encryption') ||
search_term.includes('mobile') ||
search_term.includes('phone') ||
search_term.includes('mac')
) ? true : false;
// Identify the issue type based on the search term
if (search_term.includes('outlook') || search_term.includes('email')) {
vaVars.issue_type = 'Outlook';
} else if (search_term.includes('vpn') || search_term.includes('okta')) {
vaVars.issue_type = 'VPN';
} else if (search_term.includes('mobile') || search_term.includes('phone')) {
vaVars.issue_type = 'mobile'; // Default issue type if neither Outlook nor VPN is found
} else if (search_term.includes('mac')) {
vaVars.issue_type = 'MAC';
} else {
vaVars.issue_type = 'Other';
}
}
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2024 01:21 PM - edited 12-04-2024 01:25 PM
in the virtual agent designer