Contents
- Introduction
- Scenario Builder Application
- Scenario Blocks
- Accept
- Add to Calling List
- Answer
- Attached Data
- Collect Digits
- Comment
- Connect Call
- Connect Chat
- DB Execute
- Exception Handler
- Exit
- Fetch URL
- Find Agent
- Get Next Record
- Get Statistics
- Get User Configuration
- Goto
- If
- Internal Message
- Log
- Menu
- Play Prompt
- Record
- Request Callback
- Request Input
- Request Skill or Service
- RightNow Create Object
- RightNow Screen Pop
- RightNow Search
- RightNow Select Account
- RightNow Update
- Salesforce.com Delete
- Salesforce.com Insert
- Salesforce.com Screenpop
- Salesforce.com Search
- Salesforce.com Update
- Save Survey Response
- Self-Service Provided
- Search Directory
- Send Message
- Set Agent State
- Set Disposition
- Set Priority
- Set Prompt Language
- Set Variable
- Start Another Scenario
- Stop Prompt
- Voicemail
- Wait
- Web Screen Pop
- Zendesk Create Object
- Zendesk Screen Pop
- Zendesk Search
- Zendesk Select Account
- Zendesk Update
- Variables and Expressions
- Voice Segment Types
- Scenario Example
Built-in Functions
parsedatetime(string datetime, string format) – returns the specified date and time in the Unix format (number of seconds elapsed since 1/1/1970, 00:00:00 UTC). The date and time input is expected in the ICU’s Java SimpleDateFormat: http://www.icu-project.org/apiref/icu4j/com/ibm/icu/text/SimpleDateFormat.html
now(string timezone) – returns the current time in the specified time zone in the Unix format (number of seconds elapsed since 1/1/1970, 00:00:00 UTC). Time zone is optional; if not specified, the current time will be returned in the tenant’s default time zone.
round(floating_number, precision) - rounds the number to the <precision> number of digits after the point. The result is still a floating point number.
stripnondigits(string) - removes non-digits characters from string, leaving only digits from 0 to 9, * and # symbols. E.g., stripnondigits("123abc456") will return "123456"
formatduration(duration_in_seconds) – converts duration in specified in seconds into MM:SS or HHH:MM:SS formats. Produces formatted string as output. E.g., formatduration(121) will return "02:01"
titlecase(string) - converts string to title case (each word is capitalized)
tostring(integer) - converts an integer to a string. E.g., tostring(-2+1) should return "-1" as a string
urlencode(string) – URL-encodes a string, replacing special characters using the %dd notation. This is a conservative implementation that replaces all characters that are not explicitly in allowed characters.
length(string) – returns the number of characters in a string
replace(string, search_pattern, replace_pattern, flags) - performs search and replace in the input string. Returns the string with replacements performed. Parameters:
string – the input string to be searched
search_pattern - regular expression pattern to be matched in the input string. The list of supported patterns can be found in the table below. Note the extra \ in escapes. This is necessary in order to allow literal insertions of " and new line symbols.
replace_pattern - text to insert instead of matched text according to search pattern. \\0 - \\9 are allowed in replacements
flags – one or more of the following additional conditions:
i – ignore case in the search
g – replace all matches (otherwise only the first match will be replaced)
E.g., replace(“abcdefg”,”c”,”z”,”ig”) produces “abzdefg”
Pattern Description ^ Match beginning of a buffer $ Match end of a buffer () Grouping and substring capturing […] Match any character from the set [^…] Match any character but the ones from the set \\s Match whitespace \\S Match non-whitespace \\d Match decimal digit \\D Match anything but decimal digit \\r Match carriage return \\n Match new line + Match one or more times (greedy) +? Match one or more times (non-greedy) * Match zero or more times (greedy) *? Match zero or more times (non-greedy) ? Match zero or once \\meta Match one of the meta characters: ^$().[*+?\
< Previous | Next > < Previous | Next >