How can I identify if a incident ticket is from Now mobile app?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-06-2022 08:37 AM
I have a custom option 'Mobile App' for the field 'Contact Type'. How do I identify that the ticket is from the mobile app, currently it is being populated with 'Self Service' and i want it to auto-populate with 'Mobile App'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-06-2022 08:58 AM
Hello,
There is no direct way to do it however you can do the below:-
Create a new variable on the record producer.
Create a catalog client script with the below code:-
var link= top.location.href;
Populate this value in the new variable(keep that hidden on the catalog form) now this above piece of code will only run in portal and not in you mobile so if the field return empty you know it is from mobile and map the contact type as Phone and if it comes as populated it is from Portal.
Please mark answer correct/helpful based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2022 07:07 AM
I would add this logic to your record producer script. You might need to tweak the below script.
var isMobile = GlideMobileExtensions.getDeviceType() == 'm'; // it's either 'm' or 'mobile'. Try both.
if(isMobile){
current.contact_type = 'Mobile App'; // set to your value
};
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2025 06:39 PM
worked for me, I appreciate it