Intercepting outbound emails to generate Mobile Deep Links

TBuente
Tera Contributor

Hi all,

 

I've been reading up on the documentation regarding the MobileDeepLinkGenerator API and have been trying to come up with a solution for injecting MobileDeepLinks into already existing notifications. My initial thought process was to call an email script on a per-Email Template level; however, I am unable to pass the record information (mainly sys_id) from the template level. Please see the below logic behind this approach:

 

  1. Email Template calls Email Script
  2. Email Script calls Script Include function (custom Parser) and passes JSON of the current object (or sys id string)
  3. Script Include generates Deep Links after some parsing/logic and returns the link to the email script
  4. Email Script uses template.print to render the link in the notification

 

The issue arises when I try to pass the current object/sys id to the Script Include, as there is no great way to gather this information from the template side. My questions are:

 

  1. Is there anyway that I can pass a  record/sys_id of a value (example: an Incident record) from email template to email script?
  2. If not, is there a better approach that I can be using for this? For example, is there a way to intercept outbound emails, call my DeepLink script include (which returns the link) and add the return to the email body?

 

The end goal of all of this is to provide a mobile link for users to select and be taken to our NOW Mobile application, rather than relying on the mobile device's browser. I know that I can achieve this by approaching notifications on a granular level (client scripts, event triggers, etc.); however, I would like to create a efficient, dynamic solution that works regardless of notification run-type. Open to any and all suggestions, Thank you!

0 REPLIES 0