You can use the Liquid expressions in this article as a reference for filtering and transforming data in Workflow tasks. For most of the expressions, an output is provided after the => sign.
For the complete documentation about functions, filters, and tags in the Liquid template language, refer to this page.
{{ "now" | date: "%Y-%m-%d" }}
=> 2017-07-11
{{ "now" | date: "%FT%T%:z" }}
=> 2017-07-11T02:00:00
{{ "now" | http_date }}
=> Tue, 11 Jul 2017 06:00:00 GMT
{{ Data.Account.LastInvoiceDate | date_manip: '-', 5, 'day' | date: "%Y-%m-%d" }}
=> 2017-07-5
Syntax for date_manip:
date_manip: [['-', '+'], [Integer], ['minute', 'hour', 'day', 'month', 'year']
{{ 9099.000909 | money }}
=> 9,099.00
{{ 9099.000909 | money: 'USD' }}
=> $9,099.00
{{ Data.Account.Balance | money: Data.Account.Currency }}
=> £582.62
{{ Data | to_json }}
=> JSON dump of the entire data payload.
{{ Data.Account | to_xml }}
=> XML dump of Account-related data.
{{ Credentials.zuora.username }}
=> The Username of the Workflow instance
{{ Credentials.zuora.password }}
=> The Password of the Workflow instance
{{ Credentials.zuora.url }}
=> The SOAP API URL of the Workflow instance
{{ Credentials.zuora.session }}
=> The Workflow instance session
{{ Credentials.zuora.entity_id }}
=> The Entity Id of the Workflow instance
{{ Credentials.zuora.rest_endpoint }}
=> The API URL of the Workflow instance. For example, https://rest.zuora.com/v1/.
{% assign where_condition = Data.Account | where: "AccountNumber", "A00000052" %} {{ where_condition[0].Id }}
Output: 2c92c0f84ed8ca02014edc0c8d3840
{% assign where_expression = Data.Account | where_exp: "item", "item.Balance > 100" %} {{ where_expression[0].Id }}
Output: 2c92c0f84ed8ca02014edc0c8d3840
{% assign group_by = Data.Account | group_by: "Currency" %} {{ group_by | to_json }}
Output:
[{"name":"USD","items":[{"
{% assign where_expression = Data.Account | group_by_exp: "item", "item.AccountNumber | slice: 0" %}
Output:
[{"name":"A","items":[{"