Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Email-Triggered Pre-Filled Form with Automatic Submission After 30 Days

DevYadav
Tera Contributor

1000296155.jpg

Hi Community, Good Day! 

An email is sent to the relevant user with a link to a pre-filled catalog form. When the user opens the link, they see two questions asking whether any information has changed and to confirm that the existing details are still correct. If the user does not respond within 30 days, the system assumes that there are no changes and automatically submits the form using the previously saved information so the process can continue without interruption.

I tried many solutions but i am totally blank for this. Do anyone have accurate method? 

Thanks in advance. 

 
 
3 REPLIES 3

vaishali231
Kilo Sage

hey @DevYadav 

You can achieve this requirement using a tracking table + scheduled automation approach. This ensures reliability and avoids dependency on user action.

 Recommended Solution

  1. Send pre-filled catalog link

Use a Notification or Flow to send the catalog item URL with pre-populated variables.

Pass values via URL parameters so the form opens with existing data.

  1. Maintain a tracking record
  • Create a custom table (for example: u_catalog_response_tracker)
  • Store:
    • User
    • Catalog Item
    • Variable values (important)
    • Status = Pending
    • Due Date = Today + 30 days
  1. Update on user action
  • When the user submits the catalog item:
    • Update tracker record - Status = Submitted
      (via Flow Designer or Business Rule)
  1. Auto-submit after 30 days
  • Create a Scheduled Script Execution (daily job):

Query records where:

Status = Pending

Due Date <= current date

Programmatically submit the catalog item using stored values (Cart API)

Update Status = Submitted

Script 

 

var gr = new GlideRecord('u_catalog_response_tracker');
gr.addQuery('status', 'Pending');
gr.addQuery('due_date', '<=', gs.nowDateTime());
gr.query();
while (gr.next()) {
    // Create Cart
    var cart = new Cart();
    var item = cart.addItem('CATALOG_ITEM_SYS_ID');
    // Set variables (use stored values)
    cart.setVariable(item, 'variable_1', gr.u_var1);
    cart.setVariable(item, 'variable_2', gr.u_var2);
    var req = cart.placeOrder();
    // Update tracker
    gr.status = 'Submitted';
    gr.update();
    gs.info('Auto-submitted request for: ' + gr.user);
}

*************************************************************************************************************************************

If this response helps, please mark it as Accept as Solution and Helpful.

Doing so helps others in the community and encourages me to keep contributing.

Regards

Vaishali Singh





 



hey @DevYadav 

Hope you are doing well.

Did my previous reply answer your question?

If it was helpful, please mark it as correct ✓ and close the thread . This will help other readers find the solution more easily.

Regards,
Vaishali Singh

Ankur Bawiskar
Tera Patron

@DevYadav 

when someone saves the draft, I believe it's kept for short amount of duration i.e. in minutes

why you are allowing users to keep draft for so long? not a recommended idea

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader