Get an email template with evaluated tokens

post

/crmRestApi/resources/11.13.18.05/emailTemplates/action/getMergedEmailContent

This method evaluates all the tokens for the given template with the object key.

Request

Header Parameters
  • If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
  • The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Supported Media Types
Request Body - application/vnd.oracle.adf.action+json ()
Root Schema : schema
Type: object
Show Source
Nested Schema : inputMap
Type: object
Additional Properties Allowed
Show Source
The map with template number, language, and object key to evaluate all tokens.
Back to Top

Response

Supported Media Types

Default Response

The following table describes the default response for this task.
Body ()
Root Schema : schema
Type: object
Show Source
Nested Schema : result
Type: object
Additional Properties Allowed
Show Source
Returns email template with all tokens evaluated.
Back to Top

Examples

The following example shows how to get an email template with evaluated tokens by submitting a POST request on the REST resource using cURL.

cURL Command

curl -u <username:password> \ -X PATCH https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/emailTemplates/action/getMergedEmailContent\ -H 'Content-Type: application/vnd.oracle.adf.action+json' | json_pp

Example of Request Body

The following example shows the contents of the request body in JSON format.
{
    "inputMap": {
        "TemplateNumber": "MSGT-4002",
        "ObjectKey": "300100005481493",
        "Language": "US"
    }
}

Example of Response Body

The following example shows the contents of the response body in JSON format.

{
    "result": {
        "TemplateId": "300100570459592",
        "TemplateNumber": "MSGT-4002",
        "TemplateName": "TemplateOptyMar20th_3",
        "TemplateDescription": "TemplateOptyR1",
        "ObjectCode": "Lead",
        "TemplateActiveFlag": "Y",
        "EmailFormat": "HTML",
        "EmailSubject": "O365 Lead 300100005481493 a1 ",
        "EmailBody": "O365 opportunity",
        "CreatedBy": "SALES_ADMIN",
        "CreationDate": "2023-03-21 14:06:22.489",
        "LastUpdatedBy": "SALES_ADMIN",
        "LastUpdateDate": "2023-03-21 14:06:22.837"
    }
}
Back to Top