Version 9.5 SP1
 —  API Management Solutions  —

Working with EMail Notifications

You can configure the approval workflow system so that users receive email notifications when workflow-related events occur. Notifications can be sent to users who have requests to approve. You can use predefined email templates for workflow notifications, or you can use a custom email template for each workflow that you create. For example, if you have an approval request workflow, you can use an email template that was written specifically for approval request.


Predefined Email Templates Installed with CentraSite

The following predefined email templates are installed with CentraSite. These templates are provided for you to use with the API Management workflow listed below if you do not want to create your own email templates.

Template Name Description Meant to be used with...
ApprovalNotification.html Default email template used when an approval request is approved. See the sample template below. The Approved action in the API key settings.
PendingNotification.html Default email template used when an approval request is submitted to approvers. See the sample template below. The Approval Request action in the API key settings.
RejectApprovalNotification.html Default email template used when an approval request is rejected. See the sample template below. The Rejected action in the API key settings.
NotifyAPIKeyGenerationToConsumer.html Default notification template used for notifying a consumer that a request for API key consumption has been processed successfully. See the sample template below. The Approved action in the API key settings.
OnboardingSuccessMessage.html Default notification template used for notifying a consumer that a request for consumer onboarding has been processed successfully. See the sample template below.
  • The Onboarding Organization action in the Global Onboarding Policy.

  • The Onboarding User action in the User Onboarding Policy.

APIKeyDeployFailed.html Default notification template used for notifying a provider that an API key generation has failed. See the sample template below. Internal.

Samples

ApprovalNotification.html

<html>
	<h4>Approval Notification<br/>-----------------------------</h4>
	<b>${entity.type}  ${entity.name}</b> has been approved by user <b>${entity.approver}</b>
	<h5>Approver Comments<h5>
	<b>${entity.approvercomments}</b>
</html>

PendingNotification.html

<html>
	<h4>Pending Approval Notification<br/>----------------------------------------</h4>
        Please approve the request from user <b>${user.displayname}</b> for <b>${entity.type}  <a href="${entity.BUIapprovalURL}"> ${entity.name} </a></b>
</html>

RejectApprovalNotification.html

<html>
	<h4>Rejection Approval Notification<br/>------------------------------------------</h4>
    <b>${entity.type} ${entity.name}</b> has been rejected by user <b>${entity.approver}</b>
	<h5>Approver Comments<h5>
	<b>${entity.approvercomments}</b>
</html>

NotifyAPIKeyGenerationToConsumer.html

<html>
    Congratulations! ${policycontext.consumer.name},<br/><br/>
    Your Consumption Request for the API ${entity.name} on ${request.date} has been processed successfully. <br/>
    You can now access the API using the API Key - <b> ${policycontext.apikey} </b>. The key expires on <b> ${apikey.expirationdate} </b><br/><br/>
    <b>Information about API usage:</b>
	<br>${api.usage}</br>
</html>

NotifyAPIKeyGenerationToProvider.html

<html>
    <b>Congratulations ${user.displayname}!</b><br><br>
 
    Your account request has been approved. Please use the following link to see your account profile.<br>
 
    ${entity.bui.userpreferences.url}<br><br>
 
    Your API consumption request is now being processed.<br><br>
 
    Best Regards,<br>
 
    Your Software AG API Provider Team<br>
</html>T

APIKeyDeployFailed.html

<html>
	<h4>Deployment of the API Key has failed<br/></h4>
	Hi,<br/><br/>
	This is an auto-generated mail. The deployment of API Key for API (<b>${entity.name}</b>) has failed for Consumer <b>${user.name}</b>. Kindly get in touch with your Admin to resolve this. The errors are mentioned below.<br/><br/>
	Thanks,<br/>
	CentraSite System<br/><br/><br/>
	<b>Errors</b><br/>
	${deploy.exception.string}
</html>

Top of page

Custom Email Template

You can use a custom email template for each workflow that you create. To write an email template for a workflow, see the instructions in Create Email Templates for Workflow Notifications below.

Create Email Templates for Workflow Notifications

You can use a specific email template for each workflow that you create. For example, if you have an API Consumption Approval workflow, you can use an email template that was written specifically for the API consumption approval.

Complete the following procedures to create a custom email template.

  1. Create your own custom HTML email template.

    Your HTML document should include the <html> and <label> tags as shown in the example below.

    Example of a Notify API Key Generation Email Template

    <html>
        Congratulations! ${policycontext.consumer.name},<br/><br/>
        Your Consumption Request for the API ${entity.name} on ${request.date} has been processed successfully. <br/>
        You can now access the API using the API Key - <b> ${policycontext.apikey} </b>. The key expires on <b> ${apikey.expirationdate} </b><br/><br/>
        <b>Information about API usage:</b>
    	<br>${api.usage}</br>
    </html>
  2. Specify the key parameters.

    Set this parameter... To specify...
    {policycontext.consumer.name} Name of the consumer.
    {entity.name} Name of the API.
    {request.date} Date of the request for API consumption.
    {policycontext.apikey} The API key.
    {apikey.expirationdate} Expiration date of the API key.
    {api.usage} Usage tips for the API key.

Top of page