RenderEmailTemplateResult

Contains status and error information for a request processed by the renderEmailTemplate() call, including individual results of rendered email templates.

NameTypeDescription
bodyResultsRenderEmailTemplateBodyResult[]Contains status and error information for each template body that renderEmailTemplate() processed in a request, including merged body text of templates.
errorsError[]Contains one or more errors that occurred when renderEmailTemplate() rendered a request.
successbooleanIndicates whether a request was successfully processed (true) or not (false).

RenderEmailTemplateBodyResult 

Contains status and error information for each template body that renderEmailTemplate() processed in a request, including merged body text of templates.

NameTypeDescription
errorsRenderEmailTemplateError[]Contains one or more errors that are associated with a template body that renderEmailTemplate() processed.
mergedBodystringThe text of the template body with the merge fields replaced with their corresponding values from Salesforce objects. The whatId and whoId fields on the request reference the Salesforce objects to use. The mergedBody field is populated only when the rendering of the template was successful (success is equal to true). If success is equal to false, mergedBody is null.
successbooleanIndicates whether a template body was successfully rendered (true) or not (false).

RenderEmailTemplateError 

An error that occurred when renderEmailTemplate() processed a template body.

NameTypeDescription
fieldNamestring[]The merge field that affected the error condition.
messagestringError message text.
offsetintThe offset in the template body text of the merge field that caused the error. The offset is calculated as the number of characters from the start of the body text. The offset is -1 if it can’t be determined because of insufficient contextual information.
statusCodeStatusCodeA code that characterizes the error. The full list of status codes is available in the WSDL file for your organization (see Generating the WSDL File for Your Organization).