Implementing Mobile Pop-Ups in Now Mobile and Mobile Agent Apps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Let’s Dive into Creating Mobile Pop-ups in ServiceNow Mobile Pop-ups Overview:
In ServiceNow's Now Mobile App, mobile pop-ups provide a great way to display important messages or prompts to users. These pop-ups enhance user experience by providing relevant information.
There are two primary types of mobile pop-ups:
- On Login
- On Button Click
Below are sample use cases demonstrating how each type of mobile pop-up can be implemented:
Case 1: On Login
On Login pop-ups are triggered automatically whenever a user logs into the Now Mobile App.
Use Case: Show welcome messages, announcements or remainders right after login.
To implement an On Login pop-up, you’ll need to:
- Create a Mobile Event: This event determines when the pop-up should appear (e.g., during login).
- Navigate to: All -> System Mobile -> Mobile App Builder
- Select the appropriate application scope in which you want to configure the mobile event.
- In the App Builder panel, go to: Menu -> All Mobile Records
- In the Record Type search field, type Mobile Event and select [sys_sg_event] .
- Click on New to create a mobile event
- Create a New Mobile Event
- Navigate to Mobile Events and click on New.
- Set the Type to OnLogin.
- For the Source Table, choose Mobile App Config (sys_sg_native_client).
- In the Source Record, select the specific mobile app (e.g., Now Mobile) where you want the pop-up to appear.
- Configure the Event Action
- In the Event Action section, click New to create a new action.
- Set the Action Type to ShowPopup.
- Create the Pop-up
- In the Pop-ups section of the event action, click New to create a new pop-up.
- Toggle Tap Outside to Close to true if you want the pop-up to dismiss when the user taps outside the window.
- Select the card that defines the content and buttons to be displayed in the pop-up. In this case, I have created a new card along with a custom template to display the required message and functions (here I have used pre defined functions (Continue and Log Out)
Result:
A pop-up message is displayed when the user logs into the app.
Case 2: OnButton Click
Use Case: Trigger a confirmation pop-up when an agent clicks a button.
- Create a New Mobile Event
- Navigate to Mobile Events and click on New.
- Set the Type to OnButtonClick.
- Set the source table to Function (sys_sg_button)
- Select the source record where the button is set up. When the button is clicked, the OnButtonClick pop-up will appear.
- Configure the Event Action
- In the Event Action section, click New to create a new action.
- Set the Action Type to ShowPopup.
- Specify the Table where the pop-up is applicable.
3 . Create the Pop-up
- In the Pop-ups section of the event action, click New to create a new pop-up.
- Select the Card that defines the content and buttons to be shown in the pop-up.
- In the card, select the required buttons and add the necessary functions. I’ve created a function called "Update as P1 Incident" that updates the incident priority to 1 - Critical.
Result:
For any incident where the priority is not set to Critical, the "Raise as P1 Incident" button is visible. When clicked, a pop-up is displayed.
- When the "Cancel" button is clicked, no action is taken, and the incident record remains unchanged.
- When the "Yes, Continue" button is clicked, Work Notes become mandatory. Once the agent populates the work notes and submits, the incident record is updated with the priority set to Critical.
Thanks
- 333 Views