Mapsly offers a powerful no-code automation framework extendible by code that allows you to execute various actions depending on various conditions in response to events or by schedule.

Simpler cases may be addressed by the framework's point-and-click tools without writing any code, while more complex scenarios can be implemented using Mapsly's low-code capabilities.

This article provides a high-level overview of the automation suite's concept and its components.

Supported actions

An action is a piece of business logic that act on the input data. Mapsly supports the following actions:

  • Update record: update one or multiple fields in the record that triggered a workflow or in a related record.

  • Create record: create a record of any object that supports it.

  • Delete record: remove a record.

  • Invoke URL: call an external API endpoint, REST, SOAP or custom, with adjustable parameters and request body.

  • Send email: send an email to one or multiple recipients.

  • Match records: for any record, find best-matching record(s) in any object and execute sequence of other actions with them, without writing any code.

  • Visit planner: plan regular visits to records of any object based on desired visit frequency and duration and lots of other controlling parameters.

  • Form: open a custom form with configurable fields, with custom event handlers that can execute other actions.

  • Open URL: open a URL in an iFrame inside Mapsly or in a new browser tab.

  • Show message: show a message, fixed or parameterized, with a result of an action. Useful in sequences of actions.

What can trigger actions

Actions can be executed by any of the following:

  • Workflow: triggered when a new record is created or an existing record is updated or removed, both in case the triggering event originated in the data source and in Mapsly.

  • Button: created by the Mapsly administrator and placed in various parts of the Mapsly interface such as a record's map pop-up, route waypoint, a record's table view's context; or for object-independent buttons - in the map right-click context menu or the main menu. When enabled by the Mapsly administrator and allowed by the user who clicks the button, actions executed by the Button have access to user's current location, which may be used in scenarios like a "Check-in" into an account during a visit.

  • Schedule: runs actions on a regular basis with the configured regularity.

  • By a Match records action.

  • In event handlers of a Form's buttons and fields.

Debugging & logging

In addition to the Event log and Data exchange log, Mapsly offers an Execution log that contains every execution sessions initiated a triggering event with the list of executed actions.

When detailed logs are activated, additionally Mapsly logs the entire stack trace of functions, evaluated templates and other lower-level activities nested in actions, with the Context content at the beginning of every activity. Detailed logs are crucial to debugging your Mapsly automation.

Execution context & Twig templates

When a workflow is triggered or a button is clicked, Mapsly creates an execution context and puts there input data such as records, for which the workflow or button is executed. Since all parameters in Mapsly's actions are Twig templates, actions can access data from the execution context as Twig variables and perform various calculations and formatting using Twig tags, filters, functions and operators.

In its simplest form, a Twig template can be as simple as {{record.Account_Name}}, which accesses the current record's Account_Name field.

Or, the Twig code

[{{ records | column('id') | join(',') }}]

used in an Invoke URL's Body parameter will form a JSON-array of record ID's out of records for which a button was pressed which, for example, can be used to call your custom API endpoint to add those records to a contact list in your data source.

More over, since Twig is a programming language - with cycles, conditions and function calls - it introduces a whole level of low-code capabilities to Mapsly. For example, you can use Twig code to calculate a complex metric out of multiple records or perform multiple external API callouts.

Also, in your Twig code you can programmatically call any Mapsly action using the Do(actionAPIname, inputData) function - to build an automation process that cannot be achieved by using only condition/actions blocks.

Code statements

To execute business logic that cannot be addressed by an standard action, use Twig template in a Code statement.

Did this answer your question?