Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Overview:

  Sunbird service to send email notification to content creator,reviewer and publishers per channel basis.

Current Notification Service API:

     As per the existing api specification:


api endPoint : "/v1/notification/email"
Request :
{
"params": { },
"request":{
"name": "Aarvin",
"subject": "NOTIFICATION MAIL SEND TESTING 001",
"body": "This the testing Notification mail body",
"actionUrl": "https://lh3.googleusercontent.com/Yh6ZlCb8dQIDIwAWbwd2jboFCyTqq8wc2xbLMs9ykYemOX3vjOTtT6Npfbk-jFkCciwY=w300",
"actionName": "Download Image",
"recipientEmails": [],
"recipientUserIds": ["e4d4f77c-7d5f-4436-a01e-1fe129af875a"],
"emailTemplateType":"rejectContent",
"tempPassword":"gvvucd637",
"userName":"Alpha"
}
}

existing templates:
1. contentFlaggedMailTemplate
2. acceptFlagMailTemplate
3. rejectFlagMailTemplate
4. publishContentMailTemplate
5. rejectContentMailTemplate
6. welcomeMailTemplate
7. unlistedPublishContentMailTemplate
8. emailtemplate(default)

Schema for email template is :

"name": "Amit" (Initial Addressing)
"subject": "NOTIFICATION MAIL SEND TESTING 001" (subject of the mail)
"body": "This the testing Notification mail body" (Body of mail)
"actionUrl": "https://lh3.googleusercontent.com/Yh6ZlCb8dQIDIwAWbwd2jboFCyTqq8wc2xbLMs9ykYemOX3vjOTtT6Npfbk-jFkCciwY=w300" (Link to the content)
"actionName": "Download Image" (display name for the content link)
"recipientEmails": [""]
"recipientUserIds": ["e4d4f77c-7d5f-4436-a01e-1fe129af875a"]
"emailTemplateType":"rejectContent" (template type)
"tempPassword":"gvvucd637" (password for welcome email)
"userName":"Alpha" (username for welcome email)
"orgName": "Team Sunbird" (Name of the sender to be displayed after regards)
"fromEmail" : "support-staging@open-sunbird.org" (support/from email id,configurable)
"orgImageUrl" : "org logo url" (configurable)

   Proposed Solution

           Now will store different types of email template as blob in cassandra, and based on the emailTemplateType value in request will fetch the corresponding template, 
if not found then will use our default template 'emailtemplate' for notification.

    New Feature

           Need to send notification mail to all the reviewers of a channel.

Solution 1 :
will add one new parameter to the existing notification api i.e
"notifyReviewers" : true/false
based on the notifyReviewers flag will fetch all reviewers of the given channel and will notify them instead of making two extra call from portal to fetch all reviewers
and then notify them.

solution 2 :
will write new api for notifying reviewers
endpoint : /v1/notify/reviewers


            





  • No labels