# Message templates

{% hint style="info" %}
Access the message dashboard: <https://racemap.com/admin/message-templates>
{% endhint %}

<figure><img src="https://1672210197-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSRNxaH2Ju9Flr7JhJD%2Fuploads%2FV6tOjX7ePWOJI4QBymKm%2Fimage.png?alt=media&#x26;token=7cc2890c-e734-429c-ad44-e9b9a3aa63ab" alt=""><figcaption><p>Overview over the message dashbord with custom commands and public commands.</p></figcaption></figure>

**The message dashboard provides:**

* Private messages: Custom messages you create, accessible only in your account.
* Public messages: Provided by RACEMAP and available for all users.&#x20;

**Key features:**

* Device support: Manage message templates for a variety of tracker types supported in RACEMAP. For more details on supported hardware, visit [supported GPS devices](https://docs.racemap.com/hardware-for-live-tracking#various-gps-devices-for-live-tracking-in-racemap).
* Ownership control: Private messages can be applied only to devices you own or can edit. These messages cannot be shared with borrowers.
* Template ID: Each template is assigned a unique `templateId`, which is required when sending messages from external systems.&#x20;
* Export your private messages as GeoJSON files for external use.

{% hint style="info" %}

### Messaging through API <a href="#trackers-api" id="trackers-api"></a>

Independent from sending [commands through the UI of the tracker management](https://docs.racemap.com/tracker-management/messages) dashboard you can use message templates to integrate command sending into your system eg. to level up the automatization of your processes.

**URL** `https://racemap.com/api/v1/trackers/messages` \
**Method** Send \
**Sample message template** - Set report interval - for Queclink GL3xx GPS trackers: \
<https://racemap.com/admin/message-templates/6613c31ad019cb0ece29e251>&#x20;

Get the required `deviceId`(s) from the [current API](https://docs.racemap.com/api/current).&#x20;
{% endhint %}

#### Compose your own message templates

* Use the "Add template" button to create a new private message.
* Duplicate & edit: Copy an existing message and modify it to create a private version.&#x20;

<figure><img src="https://1672210197-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSRNxaH2Ju9Flr7JhJD%2Fuploads%2FHWZWHVfYwfdL2SOKfc1L%2Fimage.png?alt=media&#x26;token=64ffdbd8-33bc-4db8-abc1-0490f3c68983" alt=""><figcaption></figcaption></figure>

For each message template the below information must be provided.&#x20;

* Name: The name of the template&#x20;
* Variant: Either single or group&#x20;
  * Single: The same template is applicable for one or multiple trackers.&#x20;
  * Group: Groups several single templates with the same function for different tracker types (e.g., the "Shut down" command for GL300, LK106, and M20 grouped together).
* Description: Explain the effect of the message on the GPS tracker and clarify any parameters, including their units.
* Tracker types: Select the supported trackers to which the message applies.
* Allowed user roles: Specify whether the message can be used by you as the owner and or editors.
* Template: Provide the command, that will be send with the message.
* Arguments: If the command uses parameters, define them here.
* Example: A copyable example of the template.
