Table of Contents

Parameters are placeholders that are used to modify the content and behaviour of actions when they are executed. You can enter any parameter placeholders into any text field in a WunderAutomation action. When the action is executed the placeholder values are replaced with values from the WordPress environment and the provided objects.

Find the full list of built in parameters here.

Let’s say you want to send an email to a WordPress user after the first login. You create an “Send email” action and set recipient to {{ }} and perhaps set the email subject to “Hello {{ user.firstname }}. When the workflow is executed, the parameter names inside the double curly brackets will be replaced with the actual values for that user.

The easiest way to use parameters is via the parameter meny on the left hand side in the workflow editor. It always shows the available parameters based on the selected workflow trigger.

Parameters available when working with a user trigger

When clicking on a parameter name, the parameter editor pops to make it easier to define the exact behaviour of the selected parameter:

Parameter syntax #

Most of the time, you will be able to get the parameter place holder using the popup parameter editor so you don’t have to learn the syntax by heart. The resulting placeholder syntax is always visible at the botton of the editor screen.

The parameter placeholders are always enclosed in double curly braces, {{ }}. The content of the placeholder is then divided into parts:

Parameter nameThe name of the parameter. Always written in small caps. Most parameter names consists of two parts, a group and a name, i.e
Divisor |If the parameter placeholder also has modifiers, the name and the modifiers needs to be separated with a single pipe (|) character
ModifiersModifiers are used to modify how the parameter is resolved at execution time. They can provide formatting patterns, default values etc. A modifier has the syntax name: ‘value’. Multiple modifiers are separated with comma (,)

Modifiers #

To control the exact output of a resolved parameter, modifiers can be used.

Return field asreturnvalue or labelBy default, parameters will return its internal value as represented in the database. Some parameters can also have a label, or “human readable” representation. I.e the post status “publish” is almost always written using the label “Published”.
Treat field astypetext, date, phoneWith some parameters, the returned value might need to be converted to a specific format.
Format (date)formatRelevant for fields that return date values. Formats the date using PHP date() function (I.e Y-m-d H:i:s). If left blank, defaults to using WunderAutomation standard date time format. Read more about working with date parameters.
Add or subtractaddRelevant for fields that return date values. Modifies the returned value using PHP strtottime() function. Read more about working with date parameters.
Format (phone)formate.164Optionally formats the phone number in E.164 format for sending. SMS etc. If no country code is typed in by customer, E.164 formatting will use country code from customer billing country or WooCommerce shop address
Url encodeurlencyes / noIf the returned value is going to be used in an API call, it’s sometimes needed to URL-encode it first.

Powered by BetterDocs

Leave a Reply

Your email address will not be published. Required fields are marked *