Email templates

Use email templates to organize email content and add style to make emails stand out to customers and vendors. You can create a variety of email templates to use for different types of transactions, different vendors, or different customers. You can add merge fields to populate emails with dynamic data from Sage Intacct, such as the vendor name, contact information, and so on.

List email templates

get/objects/company-config/email-template

Returns a collection with a key, ID, and link for each email template. This operation is mostly for use in testing; use query to find objects that meet certain criteria and to specify properties that are returned.

Permissions and other requirements
SubscriptionCompany
User typeBusiness
PermissionsEmail templates: List
SecurityOAuth2
Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": [
    • {
      • "key": "1",
      • "id": "1",
      • "href": "/objects/company-config/email-template/1"
      },
    • {
      • "key": "2",
      • "id": "2",
      • "href": "/objects/company-config/email-template/2"
      }
    ],
  • "ia::meta": {
    • "totalCount": 2,
    • "start": 1,
    • "pageSize": 100,
    • "next": null,
    • "previous": null
    }
}

Create an email template

post/objects/company-config/email-template

Creates a new email template.

Permissions and other requirements
SubscriptionCompany
User typeBusiness
PermissionsEmail templates: Add
SecurityOAuth2
Request
Request Body schema: application/json
required

Email template to create

name
required
string

Name for the email template.

Example: "Sales invoice-Monthly"
subject
required
string

Enter a combination of text and merge fields as desired to create an informative subject line.

Example: "Account statement due by {!ARINVOICE.WHENDUE!}"
body
required
string

Enter a combination of text, merge fields, and HTML markup as desired to create and customize the message.

Example: "Message for all to see"
status
string
Default: "active"

Object status. Active objects are fully functional. Inactive objects are essentially hidden and cannot be used or referenced.

Enum: "active" "inactive"
Example: "active"
description
string

Description of the email template.

Example: "Used to send monthly sales invoices."
object

Sender information for the email template.

replyTo
required
string

The email address you want recipients to reply to. This corresponds to the From email address the user sees in the Print/Email dialog box when they send an email from a transaction.

Example: "[email protected]"
senderName
string

Display name for the reply to address.

Example: "John Smith"
object

Recipient information for the email template. You can put one or more email addresses in each field (use commas to separate multiple addresses), or you can use one or more merge fields in each field. The merge fields are replaced with the actual email addresses when the email is sent.

to
string

The primary recipients of the email.

Example: "[email protected]"
cc
string

Recipients who should receive a courtesy copy of the email.

Example: "[email protected]"
bcc
string

Recipients who should receive a copy of the email but not be visible to other recipients.

Example: "[email protected]"
object

Logo information for the email template. The logo is included in the email if the isLogoIncluded property is set to true.

isLogoIncluded
boolean
Default: false

Set to true to include the logo image file identified on the Company Information page in the email template.

Example: true
verticalPosition
string
Default: "bottom"

Vertical logo position. Sets whether the logo should appear at the top or bottom of the email.

Enum: "bottom" "top"
Example: "bottom"
horizontalPosition
string
Default: "left"

Horizontal logo position. Sets whether the logo should appear on the left or right side of the email.

Enum: "left" "right"
Example: "left"
includeTxnAttachments
boolean
Default: false

Set to true to include documents attached to the transaction, such as receipts, in emails sent from transactions. Attachments are emailed in the format in which they were attached to the transaction. For example, if you attached a TXT file, the file is sent as a TXT file.

Example: true
includeProjectInvoiceTxnAttachments
boolean
Default: false

Set to true to include all source document attachments linked to a project invoice when emailing the invoice. Attachments are emailed in the format in which they were attached to the transaction. For example, if you attached a TXT file, the file is sent as a TXT file.

Example: true
templateType
string
Default: "arInvoice"

The type of transaction to use this email template for. This value determines the merge fields available for use in the subject and body of the email template.

Enum: "arInvoice" "arStatement" "contract" "orderEntryTxn" "purchasingTxn"
Example: "arInvoice"
useSendersPreferredDateFormat
boolean
Default: false

Set to true to use dates in the email in the user preference setting.

Example: true
combineAttachmentsToZip
string
Default: "none"

Combine attachments into a zip file

  • none - Do not combine attachments into a zip file
  • single - Combine attachments into a single zip file
  • expenseType - Combine attachments into a single zip file by expense type
Enum: "expenseType" "none" "single"
Example: "none"
Responses
201

Created

400

Bad Request

Request samples
application/json
{
  • "name": "New Customer Email Template",
  • "description": "Email template for new customers",
  • "templateType": "purchasingTxn",
  • "sender": {},
  • "recipients": {},
  • "subject": "Welcome!",
  • "body": "New customers receive a 10% discount on their first subscription order."
}
Response samples
application/json
{
  • "ia::result": {
    • "id": "12",
    • "key": "12",
    • "href": "/objects/company-config/email-template/12"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Get an email template

get/objects/company-config/email-template/{key}

Returns detailed information for a specified email template.

Permissions and other requirements
SubscriptionCompany
User typeBusiness
PermissionsEmail templates: List, View
SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned key for the email-template.

Example: 12
Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": {
    • "id": "2",
    • "key": "2",
    • "audit": {
      • "createdDateTime": "2014-08-22T18:45:25Z",
      • "modifiedDateTime": "2014-05-19T06:12:46Z",
      • "createdByUser": {
        },
      • "createdBy": "1",
      • "modifiedByUser": {
        },
      • "modifiedBy": "82"
      },
    • "status": "active",
    • "name": "Email Template for Customer",
    • "description": "Email Template for Customer",
    • "templateType": "contract",
    • "sender": {},
    • "recipients": {
      • "to": "{!CONTRACT.DISPLAYCONTACT.EMAIL1}",
      • "cc": "'{!CONTRACT.DISPLAYCONTACT.EMAIL2!};{!CONTRACT.BILLTO.EMAIL1!}'",
      • "bcc": null
      },
    • "subject": "Renewal notification for contract: {!CONTRACT.CONTRACTID!}",
    • "body": "'Hi {!CONTRACT.CUSTOMERNAME!},\n\nThis is a friendly reminder that the contract {!CONTRACT.CONTRACTID!}--{!CONTRACT.NAME!} is renewing {!CONTRACT.ENDDATE!}. The renewal contract is {!CONTRACT.BASECURR!}.\nPlease contact your sales representative if you have any questions.\nRegards,\nContract Team.'",
    • "logo": {
      • "isLogoIncluded": true,
      • "verticalPosition": "top",
      • "horizontalPosition": "left"
      },
    • "includeTxnAttachments": false,
    • "includeProjectInvoiceTxnAttachments": false,
    • "useSendersPreferredDateFormat": null,
    • "combineAttachmentsToZip": "none",
    • "href": "/objects/company-config/email-template/2"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Update an email template

patch/objects/company-config/email-template/{key}

Updates an existing email template by setting field values. Any fields not provided remain unchanged.

Permissions and other requirements
SubscriptionCompany
User typeBusiness
PermissionsEmail templates: Edit
SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned key for the email-template.

Example: 12
Request Body schema: application/json
status
string
Default: "active"

Object status. Active objects are fully functional. Inactive objects are essentially hidden and cannot be used or referenced.

Enum: "active" "inactive"
Example: "active"
name
string

Name for the email template.

Example: "Sales invoice-Monthly"
description
string

Description of the email template.

Example: "Used to send monthly sales invoices."
object

Sender information for the email template.

replyTo
string

The email address you want recipients to reply to. This corresponds to the From email address the user sees in the Print/Email dialog box when they send an email from a transaction.

Example: "[email protected]"
senderName
string

Display name for the reply to address.

Example: "John Smith"
object

Recipient information for the email template. You can put one or more email addresses in each field (use commas to separate multiple addresses), or you can use one or more merge fields in each field. The merge fields are replaced with the actual email addresses when the email is sent.

to
string

The primary recipients of the email.

Example: "[email protected]"
cc
string

Recipients who should receive a courtesy copy of the email.

Example: "[email protected]"
bcc
string

Recipients who should receive a copy of the email but not be visible to other recipients.

Example: "[email protected]"
subject
string

Enter a combination of text and merge fields as desired to create an informative subject line.

Example: "Account statement due by {!ARINVOICE.WHENDUE!}"
body
string

Enter a combination of text, merge fields, and HTML markup as desired to create and customize the message.

Example: "Message for all to see"
object

Logo information for the email template. The logo is included in the email if the isLogoIncluded property is set to true.

isLogoIncluded
boolean
Default: false

Set to true to include the logo image file identified on the Company Information page in the email template.

Example: true
verticalPosition
string
Default: "bottom"

Vertical logo position. Sets whether the logo should appear at the top or bottom of the email.

Enum: "bottom" "top"
Example: "bottom"
horizontalPosition
string
Default: "left"

Horizontal logo position. Sets whether the logo should appear on the left or right side of the email.

Enum: "left" "right"
Example: "left"
includeTxnAttachments
boolean
Default: false

Set to true to include documents attached to the transaction, such as receipts, in emails sent from transactions. Attachments are emailed in the format in which they were attached to the transaction. For example, if you attached a TXT file, the file is sent as a TXT file.

Example: true
includeProjectInvoiceTxnAttachments
boolean
Default: false

Set to true to include all source document attachments linked to a project invoice when emailing the invoice. Attachments are emailed in the format in which they were attached to the transaction. For example, if you attached a TXT file, the file is sent as a TXT file.

Example: true
templateType
string
Default: "arInvoice"

The type of transaction to use this email template for. This value determines the merge fields available for use in the subject and body of the email template.

Enum: "arInvoice" "arStatement" "contract" "orderEntryTxn" "purchasingTxn"
Example: "arInvoice"
useSendersPreferredDateFormat
boolean
Default: false

Set to true to use dates in the email in the user preference setting.

Example: true
combineAttachmentsToZip
string
Default: "none"

Combine attachments into a zip file

  • none - Do not combine attachments into a zip file
  • single - Combine attachments into a single zip file
  • expenseType - Combine attachments into a single zip file by expense type
Enum: "expenseType" "none" "single"
Example: "none"
Responses
200

OK

400

Bad Request

Request samples
application/json
{
  • "name": "New Customer Email SW",
  • "recipients": {},
  • "includeTxnAttachments": true
}
Response samples
application/json
{
  • "ia::result": {
    • "id": "6",
    • "key": "6",
    • "href": "/objects/company-config/email-template/6"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Delete an email template

delete/objects/company-config/email-template/{key}

Deletes an email template.

Permissions and other requirements
SubscriptionCompany
User typeBusiness
PermissionsEmail templates: Delete
SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned key for the email-template.

Example: 12
Responses
204

No Content

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": {
    • "ia::error": {
      • "code": "invalidRequest",
      • "message": "A POST request requires a payload",
      • "errorId": "REST-1028",
      • "additionalInfo": {
        },
      • "supportId": "Kxi78%7EZuyXBDEGVHD2UmO1phYXDQAAAAo"
      }
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 0,
    • "totalError": 1
    }
}

Query email templates

post/services/core/query

Use the query service to find email templates that meet certain criteria and to specify the properties that are returned.

SecurityOAuth2
Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": {
    • "ia::error": {
      • "code": "invalidRequest",
      • "message": "A POST request requires a payload",
      • "errorId": "REST-1028",
      • "additionalInfo": {
        },
      • "supportId": "Kxi78%7EZuyXBDEGVHD2UmO1phYXDQAAAAo"
      }
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 0,
    • "totalError": 1
    }
}