Asrsql

Allows you to create a custom grammar file from a SQL database used by your organization. For example, you might want to route customers based on an uttered part number or employee last name. Grammar files are in the .grxml format.

Asrsql is not used in production scripts, but rather, in a special use script that is run on an occasional or as-needed basis. When the script is run, the action uses DB Connector to connect to your external database and pull a file of values based on the query you provide.

This action is typically used in conjunction with the ASRCOMPILE action to create a compiled grammar file from a database.

ASR actions appear only if ASR is enabled for your organization. ASR is an optional feature. Ask your CXone Account Representative for more information.

Supported Script Types

The icon for the Phone script type - an old-style phone handset with curved lines indicating sound coming out of it.

Phone

Input Properties

These properties define data that the action uses when executing.

Property

Description

Caption

Enter a short phrase that uniquely identifies this action in the script. The caption appears on the script canvas under the action icon. The default is the action name.

GrammarFileName The name of the grammar (GRXML) file you want to compile. You must upload this file in Studio prior to processing it with Asrcompile. The newly-compiled file will have the same name, but with a GRAM extension. After processing, the new file is stored with your other Studio files.
SpellRuleItems Formats the detected utterance to each individual character of what was spoken instead of the whole word. This would be used when pulling account numbers or part numbers so each character is individual. The formatting adds a space between each of the characters. For example, ABC12345 would be A B C 1 2 3 4 5. The default is True.
IsOutputFormatted Formats the GRXML file so it is easier to read. It is formatted similarly to XML. The default is True.
SQLQuery

The SQL that would get the data to build the .grxml file. The first return of the SELECT statement would be the utterance that would be detected by the ASR engine to find a match. For example:

SELECT[Name]
	,[Address]
	,[Phone_Number]
FROM [dbo].[User_Table]
WHERE[ID]>0

In the example above, the first return in the SELECT is Name, so the grammar would be built to presumably detect a person's name. If a match exists, the corresponding Name, Address, and Phone Number would be returned with that record.

TimeoutSec

Determines how long the IVRClosed Automated phone menu that allows callers to interact through voice commands, key inputs, or both, to obtain information, route an inbound voice call, or both. waits for input (either spoken or by key-press) before it takes the OnTimeout branch. This is the threshold for complete silence on the line. The default value is 10 (seconds). To change it, enter a whole number.

The timer starts only when the prompt is completely finished. However, the system has a built-in limit of two minutes (120 seconds) that includes the duration of the prompt. If this limit is reached during an action, any active prompts are aborted and the OnError branch is taken. For this reason, you should know the duration of your prompts and set a value for this field that ensures the action is active for less than two minutes.

Result Branch Conditions

Result branch conditions allow you to create branches in your script to handle different outcomes when an action executes.

Condition

Description

Default Path taken unless the script meets a condition that requires it to take one of the other branches. It is also taken if the action's other branches are not defined.
OnNoRecords Path taken when the query submitted to the database does not return results.
OnError Path taken when there is an unexpected problem (for example, poor connectivity, syntax errors, and so forth). The _ERR variable should be populated with a condensed explanation of the problem.
OnTimeout Path taken if there is no response for the number of seconds specified.

Tips & Tricks

You can pass the languageLocale variable from the Voiceparams action, which sets the language that the action will detect.