Table of Contents

WxCC Flow Designer

Pebble Examples

Reference: https://pebbletemplates.io

TIME

WxCC - Custom Pebble filters

{{ now() | epoch(inMillis=true) }} => default UTC timezone and in milliseconds => 1667471522829

Concatenate

Simple enter the variables as you want them with a seperator if you want as well. Example - 3 variables with hyphen separator

{{GetQueueInfo_NCCC_Fault_Q.EWT}}-{{GetQueueInfo_NCCC_Fault_Q.PIQ}}-{{GetQueueInfo_NCCC_Fault_Q.FailureCode|default("0")}}

you could also use the Join and collection capability as below - but above is simpler and straight forward.

{{[GetQueueInfo_NCCC_Fault_Q.EWT, GetQueueInfo_NCCC_Fault_Q.FailureCode, GetQueueInfo_NCCC_Fault_Q.FailureDescription]|join(',')}}

SPLIT, FIRST, LAST

{{ now() }} => 2023-05-16T07:02:01.926788Z[UTC]
{{ now() | split('Z') | first }} => 2023-05-16T07:02:01.926788
{{now() | split('Z') | first | split('\.') | last }} => 926788
{{now() | split('Z') | first | split('\.') | last | last }} => 8

IF / ELSEIF / ELSE

Note when using an expression in a CASE element - do not have any carrier returns. Have the expression all in one line - as per below examples. While it might validate successfully with the expression tester - it fails in the CASE element.

{% if (Global_EWT_minutes == 1) %}minute{% elseif (Global_EWT_minutes > 1) and (Global_EWT_minutes <= 60) %}minutes{% else %}disable{% endif %}
{% if (NewPhoneContact.ANI|length == 12) and (NewPhoneContact.ANI == '123456789012')%}{{NewPhoneContact.ANI|slice(8,12)}}{% else %}0{% endif %}

SLICE

fromIndex: 0-based and inclusive
toIndex: 0-based and exclusive

{{"123456789012345"|slice(8,12)}} => 9012

DB Connector

Global Variables

Update the default value in a Global Variable so you can reference it and check its value in another call session / script

More Pebble Examples

In Condition Node

ANI starts with is one of the two phone numbers below

{{(NewPhoneContact.ANI=='+353858769707') or (NewPhoneContact.ANI=='+353851231234') }}

ANI starts with '+3538'

{{(NewPhoneContact.ANI|slice(0,5)) == '+3538'}}