addLocationData
A Workflow Engine function that populates the standard address fields in the standard custom_info.location
object. All of the parameters are optional, and all allow substitution. For this reason, the “number” field is treated as a string and also allows names instead of numbers.
The destination for this data is hard-coded to the known custom_info.location
object. You can copy the data to other fields using workflow actions, but the initial destination is fixed. You can omit details, and multiple runs (example: via an external sendToWorkflow
function) updates the existing items only and not remove/blank out previously set details.
There is no validation of the contents of the values (for example, the country is not checked for a real country). Use any values may be used as needed.
This function is available as a feature of the Add-ons v2.2 download and later.
This function is available for event, alert, and Situation workflows.
The workflow sweep up filter applies to this function.
Back to Workflow Engine Functions Reference.
Arguments
Workflow Engine function addLocationData
takes the following arguments:
Name | Required | Type | Description |
---|---|---|---|
| no | string | The street number, name, etc. |
| no | string | The street name. |
| no | string | The city name. |
| no | string | The state or equivalent name (such as country). |
| no | string | The region name. |
| no | string | The country name. |
| no | string | The ZIP or postal code. |
Example
The following example demonstrates typical use of Workflow Engine addLocationData
function.
To set a basic address for an alert in an Alert Workflow:
number
: 223street
: Main St.city
: BigTownstate
: New Yorkregion
: Eastern UScountry
: USAzipCode
: 123456
The UI translates your settings to the following JSON:
{"number":223,"street":"Main St.","city":"BigTown","state":"New York","region":"Eastern US","country":"USA","zipCode":"123456"}
The function can use substitution if needed, from either the existing object or the workflowContext as needed.
Example:
{"street":"$(workflowContext.street)","city":"$(workflowContext.city)"}