I’m merging a price stored in a custom field (“currency” type) into an email. If I just insert the field directly, it comes out with a single decimal and no currency symbol, like 30.0
, which ain’t great.
However, when I select the field in the Dynamic Content builder tool, it offers “Currency Format” as one of the modifiers, with an empty parameters field next to it. I can’t find any documentation for what’s supposed to go in the parameters field. From testing, it seems to accept literally anything and always spits out the price formatted with a dollar sign and two cents places – i.e. all of the following give the same output despite their increasing ludicrousness:
[[ contact.custom_fields.CJMSubscriptionPrice | currency ]]
[[ contact.custom_fields.CJMSubscriptionPrice | currency: true ]]
[[ contact.custom_fields.CJMSubscriptionPrice | currency: false ]]
[[ contact.custom_fields.CJMSubscriptionPrice | currency: 42 ]]
[[ contact.custom_fields.CJMSubscriptionPrice | currency: abcdefghi ]]
[[ contact.custom_fields.CJMSubscriptionPrice | currency: "Zaphod Beeblebrox" ]]
Are there any parameter values that actually do something? I’d love a way to format with/without cents for whole-dollar amounts, for instance. (I would assume it should work something like how date fields take the custom: "YYYY"
Liquid filter for formatting.)
For now I’m just using the filter without a parameter since it seems safe enough.