Create entry and exit rules create-entry-exit-rules
With the Places extension and a region monitoring solution installed in your mobile application, you can create rules in Adobe Experience Platform Launch that are triggered or conditioned location data including location entry and exit events.
Rules
You can configure a rule, which is composed of an event, a condition, and an action. Each rule is composed of the following:
- One or more events
- (Optional) conditions
- One or more actions
Places Service events
Places Service offers the following events on which you can run a rule:
- Enter POI, which is triggered by the Places SDK when your customer enters the POI that you configured.
- Exit POI, which is triggered by the Places SDK when your customer exits the POI that you configured.
Places Service conditions
Conditions define the criteria that the data associated with the event, or the shared state of an extension at that instance, must meet for the action to be taken. For example, you can set a condition to trigger an action on an entry to a coffee shop only in the city of San Francisco.
The Places SDK maintains the following states:
- Current POI, which refers to the POI in which your customer is currently located.
- Last exited POI, which refers to the most recent POI that your customer exited.
- Last entered POI, which refers to the most recent POI that your customer entered.
Each POI contains the following data elements:
- ID
- Name
- Latitude/longitude
- Radius
- Metadata such as city, country, state, category
Actions
Actions define what the app will do in response to the condition for the rule is met for the fired event. For example, when your customer enters your POI, you can configure a welcome message to display on their mobile device.
Create a rule: an example
The following procedure is an example of how to create a rule that sends a post back to Slack when you enter a coffee shop in San Francisco.
The event, condition, and action are defined in the following ways:
- Event: Places entry event.
- Condition: City for the Current POI is San Francisco
- Action: Send a postback to Slack the name of the coffee shop that your customer entered.
Prerequisite
Before you create a rule, you must create a data element in Adobe Experience Platform Launch. Data elements automatically populate the necessary information about your POI in the postback message.
To create a data element in Experience Platform Launch:
- Click the Data Elements tab.
- Click Add Data Element.
- Type a name, for example, Current coffee shop name.
- In the Extension drop-down list, select Places – Beta.
- In Data Element, select City.
- In the right pane, select Current POI.
- Click Save.
Create a rule in Experience Platform Launch for Places Service
- In Experience Platform Launch, click the Rules tab.
- Click Add Rule.
- Type a name for the rule, for example, Track entry for coffee shop in SF.
Create an event
- In the Events section, click + Add. Events determine when you want the rule to fire.
- In the Extension drop-down list, select Places – Beta.
- In the Event Type drop-down list, select Enter POI.
- In Name, enter a name for the event, for example, Entering a coffee shop.
- Click Keep Changes.
Create a condition
- In the Conditions section, click +Add. Conditions determine what criteria has to be met for the action to be taken.
- In Logic Type, select Regular, which allows actions to execute if the condition is met.
- In the Extension drop-down list, select Places – Beta.
- In Condition Type, select City.
- Type a condition name, for example, Coffee shop in SF.
- In the right pane, click Current POI, and in the drop-down list, select San Francisco as one of your cities.
- Click Keep Changes.
Create an action
-
In the Actions section, click + Add.
-
In the Extension drop-down list, leave the default Mobile Core option selected.
-
Select an action type, for example, Send Postback.
a. In URL, type the postback URL for Slack, for example,
https://hooks.slack.com/services/
.b. To send a post body, select the Add Post Body check box.
c. In Post Body, add the post body, for example:
{ "text": "A customer has entered" }
c. Type a content type for example application/json.
d. Select a timeout value, for example, 5.
-
Click Keep Changes.
Publish the rule
- To activate the rule, you must publish it. For more information about publishing your rule in Experience Platform Launch, see Publishing.
Thinking beyond entries and exits
Using Places Service geo-fence entries and exits to trigger rules in Experience Platform Launch is incredibly powerful, but you can also use location data as a condition for other events to fire. For example, you could have a Mobile Core Track Action event trigger ready to fire based on a particular trackAction call event inside your app. Based on this event, you can place additional location conditions to the event before an action is performed. For example, open up an in-app survey when a purchase trackAction
event occurs, but only if the user’s current location includes specific Places Service metadata.