Skip to main content
Version: 1.5.x

Supported Email Fields

While creating an email template, you can customize the subject and body. And the to field is retreived from your recipient's User Profile. But, you have the flexibility to specify additional fields like cc, bcc, replyTo etc while sending a notification. This is supported with the concept of Overrides.

Engagespot supports overriding configurations at two levels. One at the Channel level, and the next one at the Provider level. Provider level overrides gets the highest priority.

Channel Level Overriding

In the send notification API, use the override.channel property to override the email fields. For example -

{
"notification": {
"templateIdentifier": "new-friend-request"
},
"sendTo":{
"recipients":["user-identifier"]
},
"override":{
"channel":{
"email":{
"replyTo": "replyTo@mydomain.com",
"fromName": "Anand",
"from": "anand@mydomain.com",
"bcc": ["bccemails@mydomain.com"],
"cc":["ccemails@mydomain.com"],
}
}
}
}

Supported Fields for Email Channel

{
subject: string,
to: string[],
cc: string[],
bcc: string[],
replyTo: string,
from: string,
fromName: string,
body: string,
}

Provider Level Overriding

With provider level overriding, you can pass any custom atrributes to the payload which will get merged with the provider's API request. Make use of the override.providerIdentifier property.

Example -

{
"notification": {
"templateIdentifier": "new-friend-request"
},
"sendTo":{
"recipients":["user-identifier"]
},
"override":{
"sendgrid":{
"personalizations": [
{
"to": [
{
"name": "Vinu",
"email": "vinu@example.com"
}
],
"dynamic_template_data": {
"friend_name": "Jobin"
}
}
],
}
}
}
info

To identify the fields supported in the provider override, you should read the documentation of the respective channel provider.