Overview

Merges a BPM Email Template and returns the merged data.

Summary

This request will merge and return the email template data merging the target record bean with the given BPME email template body.

Request Arguments

Name Type Description Required
targetRecordModule String Record module True
targetRecordId String Record ID True
targetTemplateId String BPM Email Template ID. True
emailToField Boolean Prepopulate Email Recipient? False
emailToData Array Sugar logic formula that will evaluate the recipient list False

Request Example

{
    "targetTemplateId": "7d2e21a6-8a76-a74f-bb53-535620211304",
    "targetRecordId": "3232sda6-8a76-a74f-bb53-535620232304",
    "targetRecordModule": "Accounts",
    "emailToField": true,
    "emailToData": {
        "formulaElement": "toString(\"test@sugarcrm.com\")"
    }
}

Response

The response will be an object containing the following fields:
Name Type Description
body String Email Body
subject String Email Subject
description String Email Description (taken from the Email Template record)
emailTo Array or Boolean List of email recipients.

Response Example

{
    "body": "Hi Tyri, Please check our website: https://www.sugarcrm.com/",
    "subject": "Casual Friday",
    "description": "Weekly updates",
    "emailTo" : [
        {
            "email_address": "test@sugarcrm.com",
            "email_address_id": "1e2521a6-8a76-a74f-bb53-535620211304",
        }
    ]
}

Change Log

Version Change
v11_13 Added /actionButton/evaluateBPMEmailTemplate POST endpoint.