# Triggers

Every in-appmessage or push notification coming from MBurger can have an array of triggers, those are managed entirely by the MBAutomation SDK that evaluates them and show the mssage only when the conditioon defined by the triggers are matched.

If thre are more than one trigger, they can be evaluated with 2 methods:

* `any`: once one of triggers becomes true the message is displayed to the user
* `all`: all triggers needs to be true in order to show the message.

Here's the list of triggers managed by automation SDK:

**App opening**

`MBAppOpeningTrigger`: Becoomes true when the app has been opened n times (`times` property), it's checked at the app startup.

**Event**

`MBEventTrigger`: Becomes true when an event happens n times (`times` property)

**Inactive user**

`MBInactiveUserTrigger`: Becomes true if a user has not opened the app for n days (`days` parameter)

**Location**

`MBLocationTrigger`: If a user enters a location, specified by `latitude`, `longitude` and `radius`. This trigger can be activated with a day delay defined as the `afterDays` property. The location data comes from the [MBAudienceSwift](https://github.com/Mumble-SRL/MBAudienceSwift) SDK.

**Tag change**

`MBTagChangeTrigger`: If a tag of the [MBAudienceSwift](https://github.com/Mumble-SRL/MBAudienceSwift) SDK changes and become equals or not to a value. It has a `tag` property (the tag that needs to be checked) and a `value` property (the value that needs to be equal or different in order to activate the trigger)

**View**

`MBViewTrigger`: it's activated when a user enters a view n times (`times` property). If the `secondsOnView` the user needs to stay the seconds defined in order to activate the trigger.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ep.mburger.cloud/ios-docs/automation/triggers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
