Use email templates for outbound conversation messages

Email templates can now be used for outbound conversation messages. Utilizing groovy scripts, deploying customers can now specify specific email templates to be associated with conversation messages across multiple applications such as Service Center, Help Desk, Case Management and Digital Sales.

This feature enables organizations to apply pre-defined email templates to outbound conversation messages. Through the use of email templates, organizations can define standardized subject lines, intro and footer information to ensure compliance to company standards. Email templates have traditionally been available for use with SR Messages. Now organizations can define and utilize email templates for use with outbound conversation messages as well.

Steps to Enable

Leverage Application Composer to expose and adjust page layout and attributes. To learn more about extending your application using Application Composer, visit Oracle Help Center > your apps service area of interest > Books > Configuration and Extension.

Ensure that you are logged into the environment with a user that has the appropriate permissions to access Application Composer:

  • Ensure that you are not in a Sandbox 
  • From the Navigator menu - select configuration
  • Select Application Composer
  • Select Expand the Common Area - select Email Templates
  • Create an Email Template
    • Object Type: Conversation message
    • Name: You can select any name, but write it down as you will need to use it in the groovy script provided below.
    • Save and Close
  • From the Navigator Menu - Select Configuration
  • Create and Enter a Sandbox that has access to Application Composer
  • Enter Application Composer
  • Select Object "Outbound Message"
    • Navigate to Server Scripts >Triggers
    • Click on Action > Add
    • Add the name and set Trigger for "Before Insert In Database"
    • Add the Groovy script provided below:
      • if(SourceObjTypeCd=='InternalServiceRequest') { SourceObjTemplateName='ISR_ConvMsgTemplate' }
      • if(SourceObjTypeCd=='Case') { SourceObjTemplateName='CASE_ConvMsgTemplate' }
      • if(SourceObjTypeCd=='ServiceRequest') { SourceObjTemplateName='SR_ConvMsgTemplate' }
      • if(SourceObjTypeCd=='HRHelpDeskRequest') { SourceObjTemplateName='HRHD_ConvMsgTemplate' }
      • SourceObjTypeCd='Message'
      • SourceObjId=SourceMsgObjId
        • NOTE: Replace the SourceObjTemplateName with the name of your defined template
        • NOTE: You only need to specify the groovy script lines for the templates you have defined.  You don't have to specify all of them if they are not needed.
    • Save the Trigger

  • You are now ready to test by sending a conversation message. The template will be applied after send, and will be visible by the recipient of the message.

Tips And Considerations

If the SourceObjTemplateName in your groovy code does not exactly match the name of your defined template - this feature will not work.  It will not throw an error or exception.  If your setup is not working correctly, double-check that the names match exactly.

Access Requirements

To perform the described setup and configuration you will need to be logged in as a user that has permission to access Application Composer.