Skip to main content
Mapsly automation suite

Implement complex business processes by executing sequence of actions in response to various events or by schedule

Sergey Shurygin avatar
Written by Sergey Shurygin
Updated over 8 months ago

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.

Implementation of custom business logic using the Mapsly automation suite is included in your Mapsly subscription free-of-charge. Simply contact us in chat or at [email protected] to discuss your needs, and our engineers will implement them within hours.

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.

  • Send SMS: send an SMS message to a mobile phone.

  • 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.

  • Code: insert a multi-line Twig code fragment that implements a custom business logic that cannot be implemented using point-and-click actions. A typical use case is to pass data from one action to another β€” to link actions into a complex process.

  • Commit: saves changes in data that have been accumulated over the course of the current execution session to the database and the linked data source, which populates the IDs of newly created records and allows you to create child records referencing the newly created records in the same execution session.

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 & Masply functions

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 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 use Mapsly functions, for example to determine driving distance and time between locations, as well as programmatically call any Mapsly action using the Do(actionAPIname, inputData) function - to build automation that cannot be achieved by using only condition/actions blocks.

Did this answer your question?