Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
agrawal
Product and Topic Expert
Product and Topic Expert
Content:





Introduction


This blog provides you an insight on how to Configuring Notification Mails with Custom Email Templates for Workflows in IPD.




Roles and Authorizations required to Configure Custom Templates



  • Roles from SAP Cloud Platform Workflow:

    • WorkflowDeveloper

    • DiDeveloper



  • Roles from SAP Document Center:

    • Admin








Prepare Email templates and artifacts


You would need the following (to know more about the content for the files see SAP S/4HANA Cloud for Intelligent Product Design > Configuring Notification Mails)

  • <template-key>.properties file

    • E.g. invitationTest.properties
      subject=TEST Subject

      template=invitationTest.html

      resource.0.name=logo.jpg

      resource.0.cid=logo

      resource.0.contentType=image/jpeg





  • <template-key>.html file

    • This will contain the look and feel of the notification



  • <logo>.jpg file

    • The inline image/logo/branding you want in the notification








Maintain Mail Assets on SAP Document Center administration



  • Login to SAP Document Center administration (https://smd-<tenantId>.<host>/admin)

  • Go to SETTINGS > Mail Assets

  • Upload the assets here






Configure Email script task for workflow


As an example, we’ll be referring to SAP_IPD_ADHOC_WI_DEF.workflow (the initial definition is part of the product documentation)

  • Login to SAP Web IDE Full-Stack (https:// webidecp-<tenantId>.<host>)

  • Open the workflow project for which email is to be configured and go to the email script task

  • In the prepareEmailScript.js file add the “templateName” context as the properties file you want to reference which is uploaded as Mail Asset for SAP Document Center administration in previous step

  • Deploy this workflow

  • You have successfully configured Notification Mails with Custom Email Templates for Workflows






Verify the Email notification is as per template



  • Open account FLP and go to My Collaboration application

  • Create a Collaboration

  • Add a Work Item for yourself

  • Wait for notification to arrive in your mailbox and check if it is as per template uploaded in SAP Document Center administration Mail Assets

  • If no notification is received; do the following to troubleshoot:

    • Open FLP as Admin and Go to Monitor Workflows Workflow Instances application

    • Identify the work item that you added and view its details

    • If there was an error in identifying the template the error will be described in the Execution Logs

    • Make sure you have maintained the same properties file name in the Email script task for workflow as per file uploaded in the Mail Asset for SAP Document Center administration








Reference
SAP Intelligent Product Design > Configuring Notification Mails



PS – Please share your feedback and write to me if you have any follow-up.