This describes how to work with Tags so that they are generic and can be used by one or more applications or use cases without negative interference. The main issue to be concerned with is that SAFR Tags should be set as name/value pairs and names should be unique. This way, multiple users or scripts can use the tags field without interference.
Any user of SAFR Tags should not only add tags using name/value pairs but also read tags in such a way as to handle any tags that is is not aware of and preserve those.
While its not enforced in the user interface, tags have a very specific syntax. Tags should be comma separated list. From there it can be name/value or just any string but name/value separated by equal sign is recommended. Values are stored in an array of strings.
Syntax when entering in UI:
Syntax when submitting via REST API:
REST API will return as an array as shown above.
UI will display back as comma separated string
Syntax when submitting via REST API:
As shown, if value contains a comma, then you need to escape it with some sort of encoding.
Because mongo does not guarantee order, the array may be scrambled as shown below:
Tabs in SMS Message
The #tags token in an SMS message will be replaced by the comma separated list of tags stored in the person record. No formatting is applied. The list is presented as a single comma separated string as shown in above screenshot.
Another example
Examples:
How they appear in Desktop app:
In web console:
Custom sms format:
Resulting SMS Msg: