What are tags?

Tags are reserved words that are used in the my.bt.tn action configuration tool. You can use tags in the SMS body, email body, tweet, facebook post body, and HTTP action arguments. When the action is executed the tags are replaced with their runtime values.


Tag format

All tags start and end with < and >. Only the known tags are replaced, unknown tags are left untouched. If you do not want a tag to be replaced, then your need to escape it by prefixing it with an extra <, for example "<<ID>".


Supported Tags


Generic tags:

<DATE>
Expands to date when bttn was pressed, for example: 2015-10-01
<TIME>
Expands to time of day when bttn was pressed, for example: 10:49:30
<DATETIME>
Expands to date, time and timezone offset when bttn was pressed, for example: 2015-10-01T10:49:30+0300
<UNIXTIME>
Expands to unix timestamp of when bttn was pressed, for example: 1443685770
<NAME>
Expands to bttn's name, for example: "bttn 1668"
<USER>
Expands to bttn owners name, for example: "Burt Smatton"
<LOCATION>
Expands to bttn's location as configured in the bttn properties, for example "Kitchen"
<EMAILADDRESS>
Expands to bttn's email contact address, for example: nosuchuser@bt.tn
<LANGUAGE>
Expands to bttn's configured language, for example: finnish
<ID>

Expands to bttn's short ID, for example: 1668


<DEVICEID>

Expands to bttn's device ID, for example: 0013950007827455


<URL>

Expands to bttn's ID URL, for example: my.bt.tn/1668


<EID>

Expands to a unique numeric event id, for example: 416760


<COUNTER>

Expands to the bttn's counter value, same value as the bt.tn REST API counter endpoint would return, for example: 3


<ETYPE>

Expands to event type: "pressed", "pressed-long" or "not-pressed"


<COUNTERP>

Expands to bttn's "pressed" event type counter value, same value a request to the the bt.tn REST API counter endpoint with argument "filter=pressed" would return, for example: 2


<COUNTERL>

Expands to bttn's "pressed-long" event type counter value, same value a request to the bt.tn REST API counter endpoint with argument "filter=pressed-long" would return, for example: 1


<COUNTERN>

Expands to bttn's "not-pressed" event type counter value, same value a request to the bt.tn REST API counter endpoint with argument "filter=not-pressed" would return, for example: 1


Tags that are meaningful only in the "execute action if bttn is not pressed" -mode:


<WINDOWSTART>
Expands to date, time and timezone offset of current inactivity window start, for example 2015-10-01T10:00:00+0300
<WINDOWEND>
Expands to date, time and timezone offset of current inactivity window end, for example 2015-10-01T11:00:00+0300
<UNIXWINDOWSTART>
Expands to unix timestamp of current inactivity window start, for example 1443682800
<UNIXWINDOWEND>
Expands to unix timestamp of current inactivity window end, for example 1443686400

Tags that are meaningful only with SMS responses:


<RESPONSE>
Expands to response's body, for example: "ok, on my way!"
<RSENDER>
Expands ro response sender's phone number, for example: +3584573963205
<RDATE>
Expands to date of response reception, for example: 2015-10-01
<RTIME>
Expands to time of response reception, for example: 10:49:30
<RDATETIME>
Expands to date, time and timezone offset response of reception, for example: 2015-10-01T10:49:30+0300
<RUNIXTIME>
Expands to unix timestamp of response reception, for example: 1443685770

Tags that are meaningful only with HTTP callbacks:


<CALLBACKURL>
Expands to a dynamically generated unique HTTP callback URL, for example:
https://api.bt.tn/2014-06/callback/AAAAAFYM0kYAAAxRAAAfbQAGWxX7awGoW6bRzRpYLvmKbv98t6BwDuYEVz5eZylg