Create & Send a Link to a Document in Web Validation

 

Goal

Creating a URL link to a document that can be sent via email. When the user clicks on the link, it opens the document specified in the link in Web Validation.

 

Example: Inform the supplier that an invoice has missing information (such as the PO number) via email and provide a link where the supplier can see the invoice and enter the PO number.

 

Creating the Process

The process will require three steps.

  1. Script Task to generate the URL
  2. Service Task to send the URL to a user via email
  3. User Task for Web Validation where the document can be seen.

 

An example process is here:

Create the Token

We use the 'TokenForFederatedAccount' webservice to generate the URL. Here the script to create the Token:
 

    var token = straatos.user.tokenForFederatedAccount({LoginName: '<your username>',Password: '<your password>',System: 'myhome',RelativeExpiry: 10});
    console.log('TokenForFederatedAccount: ' + token);
    
    RejectURL = 'http://admin.cumuluspro.net/?t=' + token;

 

The TokenForFederatedAccount webservice takes the following parameters:

 

In the above code snippet, we assing the URL to an indexfield 'RejectURL', so that we can later use this field in the 'Email to Supplier' step to insert the link into the Email.

 

Sending the link via Email

In this workflow step we are now using the URL created before to embed the link in an email that is sent to the customer.

  1. Select the 'Email to Supplier' step in the workflow and click settings
  2. Select SendGrid Send Email
  3. Complete the various fields an example below:
  4. In the HTML body is where we insert the link. This is simply done by inserting the 'RejectURL' indexfiled value.

Here a sample of a HTML body:

 

<body> 
<p>Dear Sir/Madam,</p>

<p>An invoice that we have received from you needs your attention. Please click on the link below to review the invoice and the respective comments/questions.</p>

<p><a href="{RejectURL}">Open the invoice</a></p>

<p>Regards,
<br>The CumulusPro Team</br></p>
</body>

 

The {RejectURL} will be the URL to click on.

 

Instead of the HTML Body, you can insert the {RejectURL} as well in the Text Body. Works in the same way, just that HTML Body gives you more options to customise the look and feel.

 

 

 

Create your own Knowledge Base