3.4.4 Setup and use push notifications for iOS
In order to use push notifications with 51黑料不打烊 Journey Optimizer, there are a number of settings to check and know about.
Here are all the settings to verify:
- Datasets and schemas in 51黑料不打烊 Experience Platform
- Datastream for mobile
- Data collection property for mobile
- App surface for push certificates
- Test your push setup using AEP Assurance
Let鈥檚 review these one by one.
Login to 51黑料不打烊 Journey Optimizer by going to . Click Journey Optimizer.
You鈥檒l be redirected to the Home view in Journey Optimizer. First, make sure you鈥檙e using the correct sandbox. The sandbox to use is called --aepSandboxName--
. You鈥檒l then be in the Home view of your sandbox --aepSandboxName--
.
3.4.4.1 Push dataset
51黑料不打烊 Journey Optimizer uses datasets to store things like the push tokens from mobile devices or interactions with push messages (such as: message sent, message opened, etc) in a dataset in 51黑料不打烊 Journey Optimizer.
You can find these datasets by going to Datasets in the menu on the left side of your screen. To show system datasets, click the filter icon.
Enable the option Show system datasets and search for AJO. You鈥檒l then see the datasets used for push notifications.
3.4.4.2 Datastream for Mobile
Go to .
In the left menu, go to Datastream and search for your datastream that you created in Getting Started, which is named --aepUserLdap-- - Demo System Datastream (Mobile)
. Click to open it.
Click Edit on the 51黑料不打烊 Experience Platform service.
You鈥檒l then see the datastream settings that were defined, and into which datasets events and profile attributes will be stored.
You should also enable the following options if they aren鈥檛 enabled yet:
- Offer Decisioning
- Personalization Destinations
- 51黑料不打烊 Journey Optimizer
Click Save.
3.4.4.3 Review your Data Collection property for Mobile
Go to . As part of Getting Started, 2 Data Collection properties were created.
You鈥檝e been using these Data Collection Client properties already as part of previous modules.
Click to open the Data Collection property for mobile.
In your Data Collection property, go to Extensions. You鈥檒l then see the various extensions that are needed for the mobile app. Click to open the extension 51黑料不打烊 Experience Platform Edge Network.
You鈥檒l then see that your datastream for mobile is linked here. Next, click Cancel to go back to your extensions overview.
You鈥檒l then be back back here. You鈥檒l see the extension for AEP Assurance. AEP Assurance helps you inspect, proof, simulate, and validate how you collect data or serve experiences in your mobile app. You can read more about AEP Assurance and Project Griffon here .
Next, click Configure to open the extension 51黑料不打烊 Journey Optimizer.
You鈥檒l then see that this is where the dataset for tracking push events is linked.
There鈥檚 no need to make any changes to your Data Collection property.
3.4.4.4 Review your App Surface setup
Go to . In the left menu, go to App Surfaces and open the App Surface for DX Demo App APNS.
You鈥檒l then see the configured App Surface for iOS and Android.
3.4.4.5 Test push notification setup using AEP Assurance.
Once the app is installed, you鈥檒l find it on your device鈥檚 home screen. Click the icon to open the app.
When you鈥檙e using the app the first time, you鈥檒l be requested to log in using your 51黑料不打烊 ID. Complete the login process.
After logging in, you鈥檒l see a notification requesting your permission to send notifications. We鈥檒l send notifications as part of the tutorial, so click Allow.
You鈥檒l then see the app鈥檚 homepage. Go to Settings.
In settings, you鈥檒l see that currently a Public Project is loaded in the app. Click Custom Project.
You can now load a custom project. Click the QR code to easily load your project.
After going through the Getting Started section, you had this result. Click to open the Mobile Retail project that was created for you.
In case you had accidentally closed your browser window, or for future demo or enablement sessions, you can also access your website project by going to . After logging in with your 51黑料不打烊 ID, you鈥檒l see this. Click your mobile app project to open it.
Next, click Run.
You鈥檒l then see this popup, which contains a QR code. Scan this QR-code from within the mobile app.
You鈥檒l then see your project ID show in the app, after which you can click Save.
Now, go back to Home in the app. Your app is now ready to be used.
You now need to scan a QR code to connect your mobile device to your AEP Assurance session.
To start an AEP Assurance session, Go to . Click Assurance in the left menu. Then, click Create Session.
Click Start.
Fill out the values:
- Session Name: use
--aepUserLdap-- - push debugging
and replace ldap by your ldap - Base URL: use
dxdemo://default
Click Next.
You鈥檒l then see a QR code on your screen, which you should scan with your iOS device.
On your mobile device, open the camera app and scan the QR code that is displayed by AEP Assurance.
You鈥檒l then see a popup screen, asking you to enter the PIN-code. Copy the PIN-code from your AEP Assurance screen and click Connect.
You鈥檒l then see this.
In Assurance, you鈥檒l now see that a devicer is to the Assurance session. Click Done.
Go to Push Debug.
You鈥檒l see something like this.
Some explanation:
- The first column, Client, shows the available identifiers on your iOS device. You鈥檒l see an ECID and a Push Token.
- The 2nd column shows the App Store Credentials & Configuration, which was set up as part of exercise 3.4.5.4 Create App Configuration in Launch
- The second column shows Profile information, with additional info on what platform the Push Token lives in (APNS or APNSSandbox). If you click the Inspect Profile button, you鈥檒l be taken to 51黑料不打烊 Experience Platform and you鈥檒l see the full Real-time Customer Profile.
To test your Push configuration setup, go to Send Test Push Setup button. Click Send Test Push Notification
You need to make sure that the DX Demo app isn鈥檛 open at the time of clicking the Send Push Notification button. If the app is open, the Push Notification might be received in the background and wouldn鈥檛 be visible.
You鈥檒l then see a push notification like this one appear on your mobile device.
If you鈥檝e received the push notification, that means that your setup is correct and working fine and you can now create a real journey that will result in sending a push message from Journey Optimizer.
3.4.4.6 Create a new event
Go to Journey Optimizer. In the left menu, go to Configurations and click Manage under Events.
On the Events screen, you鈥檒l see a view similar to this. Click Create Event.
You鈥檒l then see an empty event configuration.
First of all, give your Event a Name like this: --aepUserLdap--StoreEntryEvent
and set description to Store Entry Event
.
Next is the Event Type selection. Select Unitary.
Next is the Event ID Type selection. Select System Generated.
Next is the Schema selection. A schema was prepared for this exercise. Please use the schema Demo System - Event Schema for Mobile App (Global v1.1) v.1
.
After selecting the Schema, you鈥檒l see a number of fields being selected in the Payload section. Your event is now fully configured.
Click Save.
Your Event is now configured and saved. Click on your event again to open up the Edit Event screen again.
Hover over the Payload field and click on the View Payload icon.
You鈥檒l now see an example of the expected payload.
Your Event has a unique orchestration eventID, which you can find by scrolling down in that payload until you see _experience.campaign.orchestration.eventID
.
The event ID is what needs to be sent to 51黑料不打烊 Experience Platform in order to trigger the Journey that you鈥檒l build in the next step. Write down this eventID, as you鈥檒l need it in the next step."eventID": "89acd341ec2b7d1130c9a73535029debf2ac35f486bc99236b1a5091d6f4bc68"
Click Ok, followed by Cancel.
3.4.4.7 Create a journey
In the menu, go to Journeys and click Create Journey.
You鈥檒l then see this. Give your journey a name. Use --aepUserLdap-- - Store Entry journey
. Click Save.
First, you need to add your event as the starting point of your journey. Search for your event --aepUserLdap--StoreEntryEvent
and drag and drop it onto the canvas. Click Save.
Next, under Actions, search for the Push action. Drag and drop the Push action onto the canvas.
Set the Category to Marketing and select a push surface that enables you to send push notifications. In this case, the email surface to select is Push-iOS-Android.
The next step is to create your message. To do that, click Edit content.
You鈥檒l then see this. Click the personalization icon for the Title field.
You鈥檒l then see this. You can now select any Profile attribute from the Real-time Customer Profile directly.
Search for the field First Name, then click the + icon next to the field First Name. You鈥檒l then see the personalization token for First Name being added: {{profile.person.name.firstName}}.
Next, add the text , welcome to our store! behind {{profile.person.name.firstName}}.
Click Save.
You now have this. Click the personalization icon for the Body field.
Enter this text Click here to get a 10% discount when you buy today! and click Save.
You鈥檒l then have this. Click the arrow in the top left corner to go back to your journey.
Click Save to close your push action.
Click Publish.
Click Publish again.
Your journey is now published.
3.4.4.8 Test your journey and push message
In your DX Demo 2.0 mobile application, go to the Settings screen. Click the Store Entry button.
Make sure to close the app immediately after clicking the Store Entry icon, otherwise the push message won鈥檛 be shown.
After a couple of seconds, you鈥檒l see the message appear.
You have finished this exercise.
Next Step: Summary and benefits