Outgoing ZEMS Webhook Message Body Template
Outgoing ZEMS Webhook Message Body Template

Outgoing ZEMS Webhook Message Body Template

The Message Body Template for an outgoing ZEMS webhook must be specified when you create the ZEMS outgoing webhook. 
The format to specify for Microsoft Teams is:
{"type": "message", "text": "your text"}
The
text
parameter is a free-form string value with embedded
$variables
that are replaced with actual values from the ZEMS text message. The list of variables that can be embedded inside the text string includes:
  • $BODY
    which is the message body from the sender.
  • $SENDER
    which is the PTT Pro user login of the sender.
  • $SENDER_NAME
    which is the PTT Pro name of the sender.
Example
{"type": "message", "text": "$SENDER: $BODY"}
When using the API, the quotation marks must be escaped using a backward slash (\). This example sent over the API would be
{\"type\": \"message\", \"text\": \"$SENDER: $BODY\"}
.
Using this example Message Body Template and assuming the Microsoft Teams incoming webhook was named
Teams-Channel-ZEMSKDU
, a PTT Pro sender named
cary.grant
sending a message of
3/3/2022 test
to the outgoing webhook would result in the following message body:
{"type": "message", "text": "cary.grant: @Teams-Channel-ZEMSKDU 3/3/2022 test"}
This example would appear in the Microsoft Teams channel as
cary.grant: @Teams-Channel-ZEMSKDU 3/3/2022 test
.