Skip to content

Pebble Templates Cheat Sheet

These examples were created using the documentation available on the Pebble Templates site.

Time

Return the current date and time in UTC (yyyy-MM-dd'T'HH:mm:ss.SSS'Z)


Return the current time in a different time zone


Return the current time as hours only in a different time zone


Return the day of the week from the current time


Return the current time as Epoch in seconds


Return the current time as Epoch in milliseconds


Calculate the number of seconds a call has been in queue after capturing the current time as Epoch in seconds after placing the call in the queue


Convert milliseconds to whole minutes rounding up if the time is 30 seconds or more into the next minute. (90 seconds will return 2 minutes)


Strings

Return the last 10 characters of an ANI


Return the last 10 characters of an DNIS


Return the last 4 characters of an ANI


Split a comma delimited string into addressable pieces. (Replace "string" with the name of the string you need to split and "number" will be an Integer variable representing which value you want to return (starting with 1))


Or


Or With the addressable range starting at 0


Numbers, Logic, and Comparison

Increment a counter


Test if a number is Even (returns true/false)


Test if a number is Odd (returns true/false)


Test if a variable exists in an array or list.


Test if two conditions are true (set int to 1 and string to Bill)


Test if one of two or more conditions are true (set int to 1 and string to Steve)


Test if an expression is not true


Test if a given time stamp (as a string formatted yyyy-MM-dd'T'HH:mm:ss.SSS'Z') is less that or equal to 24 hours old