...
{
"request": {
"type": "notification",
"action": "publish",
"subType": "email",
"data": {
"templateName": "publishedTemplate",
"action": "publish",
"fields": [{
"body": "Congratulations! The content that you had submitted has been accepted for publication. It will be available for usage shortly.<br><br><b>Content Type: </b>{{Content type}}<br><b>Title: </b>{{Content title}}<br><b>Link: </b>{{Content link}}<br>",
"subject": "Congratulations, your content is live! Content Type: {{Content type}}, Title: {{Content title}}",
"logo": "https://dev.open-sunbird.org/assets/images/sunbird_logo.png"
}]
}
}
}
Request Changes
{
"request": {
"type": "notification",
"action": "requestChangesrequestForChanges",
"subType": "email",
"data": {
"templateName": "requestForChangesTemplate",
"action": "requestChangesTemplaterequestForChanges",
"fields": [{
"body": "Congratulations! The We acknowledge your contribution and effort in creating content for us. However, we are unable to accept the content that you had submitted has been accepted for publication.It will be available for usage shortly. <br> <br><b> Content .<br> We look forward to a more meaningful relationship with you, the next time around.<br><br><b>Content Type: </b>{{Content type}}<br> <b> Content Title<br><b>Title: </b>{{Content title}}<br> <b>Content Link<br><b>Link: </b>{{Content link}}<br><b>Reviewer name: </b>{{Reviewer name}}<br>",
"subject": "Congratulations, your content is live!Our sincere apologies! Content Type: {{Content type}}, Title: {{Content title}}",
"logo": "https://dev.open-sunbird.org/assets/images/sunbird_logo.png"
}]
}
}
}
Send for Review
{
"request": {
"type": "notification",
"action": "sendforReviewsendForReview",
"subType": "email",
"data": {
"templateName": "sendForReviewTemplate",
"action": "sendforReviewTemplatesendForReview",
"fields": [{
"body": "Congratulations! The content that you had submitted A content has been accepted submitted for publication.It will be available for usage shortly. <br> <br><b> Content review.<br><br><b>Content Type: </b>{{Content type}}<br> <b> Content Title<br><b>Title: </b>{{Content title}}<br><b>Creator: </b>{{Creator name}}<br> <b>Content Link<br><b>Link: </b>{{Content link}}<br>",
"subject": "Congratulations, your content is live!Content has been submitted for review! Content Type: {{Content type}}, Title: {{Content title}}",
"logo": "https://dev.open-sunbird.org/assets/images/sunbird_logo.png"
}]
}
}
}
In the above request,
- type: is the type of form.
- action: workFlow action.
- subType: type of notification.
- templateName: name used to store in Cassandra DB.
- body: Body of the Email.
- subject: subject of Email.
- logo: log used in Email. If not sent default will be used.
...
- {{Content type}}
- {{Content title}}
- {{Content link}}
- {{Creator name}}
- {{Reviewer name}}
Custom templates:
We can also create custom email template channel/tenant specific. If customized templates are not present, the default template will be used to send email for different actions in review workflows.
...
For example, If slug is "sunbird" and action is send for review, template name should be "sunbird_sendforReviewTemplate". Sample custom template configuration.
{
"request": {
"type": "notification",
"action": "sendforReviewsendForReview",
"subType": "email",
"rootOrgId": "0123166367624478721",
"data": {
"templateName": "sendForReviewTemplate",
"action": "sendforReviewTemplatesendForReview",
"fields": [{
"body": "Congratulations! The content that you had submitted A content has been accepted submitted for publication.It will be available for usage shortly. <br> <br><b> Content review.<br><br><b>Content Type: </b>{{Content type}}<br> <b> Content Title<br><b>Title: </b>{{Content title}}<br><b>Creator: </b>{{Creator name}}<br> <b>Content Link<br><b>Link: </b>{{Content link}}<br>",
"subject": "Congratulations, your content is live!Content has been submitted for review! Content Type: {{Content type}}, Title: {{Content title}}",
"logo": "https://dev.open-sunbird.org/assets/images/sunbird_logo.png"
}]
}
}
}
Limitation:
- Only predefined placeHolder can be dynamically replaced with content data while sending mail
...