# Hashtags

**Hashtags** allow to access or reference the data on and from certain parts of Mobsted platform.&#x20;

Hashtags are used in elements' properties in [Constructor](constructor_elements), API Operations, API Providers, API Methods, [Filters](untitled-1) and when [sending messages to application users](../../pwability-1/pwability/message_customers_in_every_channel).

Hashtags can be created manually or automatically via **Hashtag generator** function in **Constructor**.

<div align="left"><img src="https://877328951-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LlgISQGimMcecefzSf2%2F-Lq16rMp4pWkIOV4JJ_W%2F-Lq18MAzJRpQ45XBtdbI%2Fimage.png?alt=media&#x26;token=238ca231-dbe6-4a14-9853-8b53c04ff6d3" alt=""></div>

**gif добавить**

**Hashtag generator** works for the below parts and functions of the platform: &#x20;

* [Application](#current-application)
* [Backendname ](#constructor-elements-backendnames)
* [Event ](#events)
* LastEvent (last event created on app user action)&#x20;
* [Filter](#filters)
* [Object ](#current-object)
* [API Operation ](#api-operations)
* [Screen ](#current-screen)
* [System ](#system)
* [Tenant ](#current-tenant-mobsted-account)
* [Variable](#variables)

{% hint style="warning" %}
When enetring Hashtags manually make sure the text contains **no spaces** otherwise they won't work.&#x20;
{% endhint %}

{% hint style="warning" %}
Some hashtags work for app users or for platform users ([Business servicers](../user_access#manage-mobsted-platform-user-access)) only. Please, pay attention to relevant notes to the sections below.
{% endhint %}

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_

#### HASHTAGS USE EXAMPLES&#x20;

**Constructor:**

Hashtags are used to display [Object](objects) data:

| **Constructor View**                                                                                       | **Application User View**                                                                                  |
| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| ![](https://storage.googleapis.com/helpdocs-assets/jyme83anlw/articles/9v4k7sfkq1/1555177319211/image.png) | ![](https://storage.googleapis.com/helpdocs-assets/jyme83anlw/articles/9v4k7sfkq1/1555312330993/image.png) |

**API Providers:**

Hashtags are used to pass data into API call parameters, for example, **#Backendname:city#** in the expanse below:

![](https://storage.googleapis.com/helpdocs-assets/jyme83anlw/articles/9v4k7sfkq1/1555177572663/screen-shot-2019-04-13-at-10-44-55-pm.png)

**Sending personalized messages to app users:**

![](https://877328951-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LlgISQGimMcecefzSf2%2F-Lq16rMp4pWkIOV4JJ_W%2F-Lq18vRA5XFJPadR5G3b%2Fimage.png?alt=media\&token=2984184a-f178-4fab-99fe-a42a5f027890)

**\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_**

#### CURRENT TENANT (MOBSTED ACCOUNT)

* **#Tenant:Name#** - tenant name
* **#Tenant:UserName#** - name of tenant creator(Client) specified at registration
* **#Tenant:MobileNumber#** - phone number of tenant creator(Client) specified at registration
* **#Tenant:Country#** - country of tenant creator(Client) specified at registration
* **#Tenant:LastModified#** - date of the last change made in the tennant
* **#Tenant:PrimaryEmail#** - email of tenant creator(Client) specified at registration
* **#Tenant:CompanyName#** - company name&#x20;



#### SYSTEM

* **#System:SentSMSCount#** - number of SMS sent in the current tenant
* **#System:SentEmailCount#** - number of Emails sent in the current tenant
* **#System:SentPushCount#** - number of Push notifications sent in the current tenant.

## &#x20;<a href="#system" id="system"></a>

#### CURRENT APPLICATION

* **#Application:id#** - app unique identifier
* **#Application:Name#** - app name when stored on a mobile device
* **#Application:DateCreate#** - app creation date and time
* **#Application:ThumbImageUrl#** - link to the image used as app icon
* **#Application:EmailPhone#** - identification type: Email or Phone Number or empty if none of these specified
* **#Application:PIN#** - if the PIN code is set to log in to app, can be 1=YES or 0=NO
* **#Application:CreateObjects#** - auto-create object on accessing app, can be 1=YES or 0=NO
* **#Application:Everytime#** - request to enter IP or PIN on user return after time out ([Return visitor timeout security setting](../user_access#manage-mobsted-pwa-app-user-access)), can be 1=YES or 0=NO
* **#Application:EventNotify1#** - type of initial notification: Email=Email, SMS=Text Message, Push=Push or Not Selected if not specified&#x20;
*   **#Application:EventNotify2#** - type of second notification:&#x20;

    Email=Email, SMS=Text Message, Push=Push or Not Selected if not specified&#x20;
* **#Application:EventNotify3#** - type of third notification: Email=Email, SMS=Text Message, Push=Push or Not Selected if not specified&#x20;
* **#Application:DesktopName#** - app name on Mobsted platform
* **#Application:IP#** - access security configuration status **IP address** (used with parameters subnet mask 1 and 2), can be 1=set to on, 0=set to off.&#x20;
* **#Application:Mask1#** - subnet mask 1 (with **IP address** security setting enabled)
* **#Application:Mask2#** - subnet mask 2 (with **IP address** security setting enabled)
* **#Application:return\_visitor\_timeout#** - time period in seconds set before requesting PIN or IP address check with **PIN** or/and **IP address** security setting enabled.



#### CURRENT SCREEN

* **#Screen:id#** - screen unique ID
* **#Screen:Name#** - screen name
* **#Screen:SortOrder#** - sequential screen number created in [Constructor](https://kb.mobsted.com/article/l6t1xqhokp-constructor)
* **#Screen:DateCreate#** - screen creation date
* **#Screen:LastModified#** - the date of last change made to screen
* **#Screen:ishomescreen#** - current screen is Home screen = true, not Home screen = false.

{% hint style="warning" %}
Screen hashtags will work for app users, in API operations called by app users and in filter results requested by app user.&#x20;

доступно на MU и в АПИ операциях, запускаемых с MU, в фильтрах, результаты запрашиваемые на MU
{% endhint %}



#### VARIABLES

**#Variable:myvar123#** - value that is stored in "myvar123" variable. For more information on Variables, please, refer to [Variables](variables) article.

![](https://storage.googleapis.com/helpdocs-assets/jyme83anlw/articles/9v4k7sfkq1/1555316288940/screen-shot-2019-04-15-at-1-17-10-pm-1.png)

{% hint style="warning" %}
Variables hashtags work for app users in API operations, API Providers methods and in filter results requested by app user.&#x20;

_доступно на MU и в АПИ операциях, АПИ провайдерах методов, запускаемых с MU, в фильтрах, результаты запрашиваемые на MU_
{% endhint %}



#### CONSTRUCTOR ELEMENTS BACKENDNAMES

* **#Backendname:name#** - backendname set for [Text input](https://mobsted.helpdocs.io/app/content/article/ap8iv7mdhw) element to reference the data entered by app user

![](https://storage.googleapis.com/helpdocs-assets/jyme83anlw/articles/9v4k7sfkq1/1555312642238/screen-shot-2019-04-15-at-12-16-43-pm.png)

* **#Backendname:radio:label#** - label of the option in [Radio Buttons element](https://kb.mobsted.com/article/qqrkkfi7fn-radio-button) selected by user ("radio" is the Backendname of **Radio Buttons** element). **Example:** use **#Backendname:radio1:label#** to reference the second radio element label
* **#Backendname:radio:value#** - value of the option in [Radio Buttons element](https://kb.mobsted.com/article/qqrkkfi7fn-radio-button) selected by user ("radio" is the Backendname of **Radio Buttons** element). **Example:** use **#Backendname:radio1:value#** to reference the second radio element value

![](https://storage.googleapis.com/helpdocs-assets/jyme83anlw/articles/9v4k7sfkq1/1555312883877/screen-shot-2019-04-15-at-12-20-28-pm.png)

* Checkboxes:
  * Use **#Backendname:PolicyAgreeCheckBox\[0]:label#** to reference the label of the first selected element
  * Use **#Backendname:PolicyAgreeCheckBox\[0]:value#** to reference the value of the first selected element.



#### CURRENT OBJECT

* **#Object:id#** - object unique ID
* **#Object:PIN#** - login PIN if PIN is set in [user access settings](../user_access#manage-mobsted-pwa-app-user-access)
* **#Object:Phone#** - object phone number
* **#Object:Email#** - object email
* **#Object:CreateDate#** - object creation date&#x20;
* **#Object:LoginUrl#** and **#Object:InviteUrl#** - personal short link to enter the app on behalf of the object. **#Object:InviteUrl#** is used for [app distribution](../../../pwability-1/pwability/app_distribution#distributing-links-via-smart-messaging) to new users
* **#Object:Enabled#** - object Status, if 0 - the object will not be able to access the app (requires to make settings in **Enabled** column in [Objects](objects)**)**
* **#Object:LastLogin#** - last date the app was accessed by the object
* **#Object:InviteStatus#** - status of an invite sent to the object
* **#Object:Timezone#** - current time zone
* **#Object:AutomaticalTimezone#** - set automatic time zone, can be ON=1 or OFF=0
* **#Object:LastModified#** - last date when object's data was changed
* **#Object:\*anyColumnName\*#** - reference to any custom column created in **Objects**
* **#Object:FacebookChannel#** - FB bot enabled=1, not enabeld=0
* **#Object:TelegramChannel# -** Telegram bot enabled=1, not enabled=0
* **#Object:ViberChannel# -** Viber bot enabled=1, not enabled=0
* &#x20;**#Object:VKChannel#** - VK bot enabled=1, not enabled=0
* **#Object:NotifyPush# -** Chrome push enabled =1, not enabled =0
* **#Object:NotifyEmail#** - Email push enabled =1, not enabled =0
* **#Object:NotifySMS#** - SMS push enabled =1, not enabled =0
* **#Object:\*anyColumnName123\*#** - reference to any custom column created in **Objects.**

#### FILTER

* **#ObjectsFilter:FilterName: FilterValue#** - get data on **Objects** filter
* **#EventsFilter:FilterName: FilterValue#** - get data on **Events** filter

**FilterName** is filter's unique name.

In the hashtags above **FilterValue** can have the following values:

* **Value** - filter value
* **Count** - number of records that apply to the filter
* **Data** - all filter records&#x20;
* **Value** -  value for aggregated data (record count, max, min value)

Filter hashtags can use **Self** modifiers: &#x20;

* **SelfData**
* **SelfValue**
* **SelfCount**&#x20;

Self modifiers allows to set additional filtering condtions on specified Object parametrs.&#x20;

For example: #EventsFilter:FilterName:FilterValue:**SelfData:id**# will return records applicable to current Object only.

{% hint style="warning" %}
**Object** column referenced in **Self modifier** must contain data, otherwise the filter will not work.&#x20;
{% endhint %}



**Merge Filters**

The filter can contain either AND or OR. In order to merge OR and AND conditions use hashtags within the new filter.

**Example:** we created the filter that displays users with email on Mobsted **OR** Outlook domain, **and** who has US phone number.![Venn diagram demonstrating the logic of the filter on Mobsted PWA platform](https://storage.googleapis.com/helpdocs-assets/jyme83anlw/articles/1iu48fq9db/1554116397746/image.png)

* First filter will contain the required Email condition, we will name it as **Email**

![Simple filter created on Mobsted PWA platoform](https://storage.googleapis.com/helpdocs-assets/jyme83anlw/articles/1iu48fq9db/1554105265429/image.png)

* Second filter will contain the required Phone condition merged with the condition filtering Emails that falls into the first filter

**#ServerSide:ObjectsFilter:Email:Data@join(",", "objects@Email")#**

![](https://storage.googleapis.com/helpdocs-assets/jyme83anlw/articles/9v4k7sfkq1/1564897926062/image.png)



{% hint style="warning" %}
**Object** column for **join** action must contain some data.

надо сделать пометку, что колонка по которой выполняется join должна содержать значения и не должна быть пустой. можно использовать id объекта или ту колонку по которой уже выполняется фильтрация
{% endhint %}



#### LOOPS

{% hint style="warning" %}
**Loops** hashtags can be created only manually.
{% endhint %}

* **#ObjectsFilter:FilterName:Data#** - creating loop which contains data based on Objects filter
* **#EventsFilter:FilterName:Data#** - creating loop which contains data based on Events filter
* **#Operation:OperationName:Response:Result:0:response:holidays#** - creating loop which contains data on API Operation (read more about API Operation hashtags in [API operation section](#api-operations))&#x20;

**Example:** creating a loop with Object filter reference.

![](https://877328951-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LlgISQGimMcecefzSf2%2F-Lq16rMp4pWkIOV4JJ_W%2F-Lq1Ap4atXO8ZmHHKCIN%2Fimage.png?alt=media\&token=7bacfb8a-64c2-4d50-b4d3-96a2021f22c4)

**Referencing Loops:**

* **#Loop:LoopName:OperationParameterName#** - referencing the repeated element of API Operation that is specified in **LoopName**
* **#Loop:LoopName:objects@Phone#** - referencing Phone column of Objects based on filter that is set in **LoopName**.

**Example:** displaying **Objects** columns which fall under **Filter** condition.

![](https://storage.googleapis.com/helpdocs-assets/jyme83anlw/articles/9v4k7sfkq1/1555223870980/image.png)

**Application User View:**

![](https://storage.googleapis.com/helpdocs-assets/jyme83anlw/articles/9v4k7sfkq1/1555314096878/screen-shot-2019-04-15-at-12-41-20-pm.png)

Также были задачи в джире - сейчас в статусе released

MOB 5292 Добавить хештег&#x20;

Loop:Name:\_\_index# в котором будет храниться НОМЕР текущего цикла итераций данного лупа.

а) Хештег должен корректно заменяться б) хештег должен присутствовать в генераторе хештегов в) хештег должен быть отражен в документации

MOB 5300

Добавить в Loop хештеги \_\_key, \_\_value при итерировании по Объектам + добавить возможность итерирования по объектам



#### EVENT

{% hint style="warning" %}
**Event** hashtags are available in Triggers' operations only.
{% endhint %}

* **#Event: id# -** Event id&#x20;
* **#Event:Value:\*EventFiledName\*#** - data from specified field in Event Value column
* **#Event:ActionName#** -  event action name.



#### LAST EVENT

**LastEvent** hashtag returns data from last event created on app user action.&#x20;

{% hint style="warning" %}
**LastEvent** hashtags are available everywhere **except** Triggers' operatio&#x6E;**.**
{% endhint %}

* **#LastEvent:id#** - Last Event id
* **#LastEvent:Value:\*EventFiledName\*#** - data from specified field in Event Value column&#x20;
* **#LastEvent:ActionName# -** Last Event action name.



#### API OPERATIONS

* **#Operation:OperationName: Response:Code#** - HTTP status code after executing the operation
* **#Operation:OperationName: Response:Result\[0].value#** - data received as response to the operation execution (\[0] - this array contains the entire response to the API request. Nesting can be multi-level, nesting levels are separated by a dot OR semicolon
* **#Operation:OperationName: Error:Code#** - HTTP status code (in case of error), after performing the operation
* **#Operation:OperationName: Error:Result\[0].value#** - data received as response to the failed operation execution (\[0] - this array contains the entire response to the API request. Nesting can be multi-level, nesting levels are separated by a dot OR semicolon.

**OperationName** – operation name assigned in the list of operations upon creation.

**Example:** we ran the operation of checking the weather in the location highlighted yellow and got the following data:

```
{ 
    "meta": [],
    "data": {
        "Response": {
            "Result": [{
                "location": {
                    "name": "London",
                    "region": "City of London, Greater London",
                    "country": "United Kingdom",
                    "lat": 51.520000000000003,
                    "lon": -0.11,
                    "tz_id": "Europe\/London",
                    "localtime_epoch": 1555318097,
                    "localtime": "2019-04-15 9:48"
                },
                "current": {
                    "last_updated_epoch": 1555317913,
                    "last_updated": "2019-04-15 09:45",
                    "temp_c": 9,
                    "temp_f": 48.200000000000003,
                    "is_day": 1,
                    "wind_mph": 15,
                    "wind_kph": 24.100000000000001,
                    "wind_degree": 90,
                    "wind_dir": "E",
                    "pressure_mb": 1023,
                }
            }, 200, { ... }],
            "Code": 200
        },
        "Error": {
            "Result": [],
            "Code": 0
        }
    }
}
```

Please Note:

* you can refer to the element of the array by using \[array element number]
* use dots instead of colons to refer to a nested JSON element.

If you want to display the weather, you can set up the following call: **#Operation:weatherOperation:Response:Result\[0]:current.temp\_c#**

The structure of the received data (after performing the operation) can be checked via **Hashtag generator.** This requires settings in API method \[**ссылка на API методы, как напишем API description]**

**gif как задавать хештеги для проверки операций**

**\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_**

#### CURRENT PAGE ROUTE

Current page route (URL)

* \#Route:path# - relative path
* \#Route:query:appid# - application ID
* \#Route:query:screenid# - screen ID
* \#Route:query:os# - OS the application was launched on (iOS / Android). Will be detected automatically if not specified
* \#Route:query:objid# - current Object ID
* \#Route:query:ref# - referrer. Possible options:
  * ref=PWA - application was launched from Home Screen
  * ref=vcard - application was launched from Contacts&#x20;
  * ref=sms
  * ref=email
* \#Route:query:\*customParameter\*# - custom parameters that can be passed from external systems.&#x20;

####

#### MENTIONED ARTICLES

* [Objects](objects)
* [Screens](../../basics/introduction/screens)
* [Smart Filters](untitled-1)
* [Events](events)
* [Constructor elements](constructor_elements)
* [Variables](variables)
* API description
* [Smart messaging](../../pwability-1/pwability/message_customers_in_every_channel)
* [User Access](user_access)
* [Apply loops to screen elements](../../basics/introduction/apply_loops_to_screen_elements)
* [App distribution](../../pwability-1/pwability/app_distribution)

## &#x20;<a href="#current_user_servicer" id="current_user_servicer"></a>
