Email Link to Approve Contracts

DylanBlumenberg
Tera Contributor

Hi everyone, 

 

We want to use the 'mailto.approval' and 'mailto.rejection' email templates in the email that gets sent out for approving or rejecting Contracts, but when clicking the approve or reject buttons in the email, it is not associating it back to the Contract.

 

I am using the existing 'Contract Approval Request' notification with a new email template called 'contract.approve.role.fti'. The email template is as follows:

2025-03-31 13_57_39-Window.png

 

When the approval email sends, the approve/reject options are missing the Contract number, and so is the subject of the approve/reject reply email.

2025-03-31 13_59_46-Post Question - ServiceNow Community and 5 more pages - Work - Microsoft​ Edge.png

 

DylanBlumenberg_0-1743447634984.png

 

 

This means when the email is received, it treats it as a new call instead of a reply to the contract. This same process works normally with RITM though. What am I missing here?

 

 

1 ACCEPTED SOLUTION

In the email template for your mailto template. You should have the subject set like this.

Re:${sysapproval} - approve

This will then pull the number into the notification subject line.

 

Correction it should look like this.

Re:${document_id} - approve

The reason is that contact is not extended from task so it would be using a different field in the approval table just like knowledge does.

View solution in original post

4 REPLIES 4

Brian Lancaster
Tera Sage

@DylanBlumenberg, if you open the email logs for the email received there should be more logs at the bottom. Does it show anything for the below inbound action?

Update Approval Request

 

Also I noticed that you approval response did not have a record number in it. When you click on the mailto link in a RITM the subject include the ritm number. So it would look something like this.

Re:RITM0000001 - approve

Hi Brian, these are the email logs I get when I sent the approval response email. 

DylanBlumenberg_0-1743528162368.png

 

I'm assuming that because the subject of the reply does not contain the record number, that's why it's not getting associated back to the record. Besides the mailto.approval email template, I'm not sure what relates a record to the initial approval email, but I'd expect that's where the issue lies. 

In the email template for your mailto template. You should have the subject set like this.

Re:${sysapproval} - approve

This will then pull the number into the notification subject line.

 

Correction it should look like this.

Re:${document_id} - approve

The reason is that contact is not extended from task so it would be using a different field in the approval table just like knowledge does.

Nice, ${document_id} did the trick to get the record tied to the email! 

 

After that, I discovered that it still will not process the approval because a new Inbound Email Action needs to be created for the Contract table. I copied the existing 'Update Requested Item - Approval' Inbound Email Action and attempted to modify it to fit the Contract table, but most of the processing is done via a script and scripting is not a talent of mine, which puts this securely in the "rainy day projects" category. If somebody feels like tackling the Inbound Email Action script for Contract and post it here, you'd win a thumbs up from me! 😉

 

That all said, thanks for the help on this @Brian Lancaster