This is an old revision of the document!
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
Below is NOT working in CASE element? Not sure why at this stageā¦.
{% 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