Keyword Support in Course Bulk Emails with edX ACE

We have enabled bulk course emails on our site and read in the documentation that we should be able to use keywords in the messages. Bulk Email Documenation

From looking through the code, it looks like the keyword replacement only happens when sending bulk emails not using edX ACE. The replacement function can be found in edx-platform/common/djangoapps/util_keyword_substitution.py and gets called during DjangoEmail rendering process.

Is there any way to use keywords and edX ACE and keywords at the same time or is the only solution to not use edX ACE? If that’s the case, how can I customize the email sent with Django Email?

Hi @emartus ,

Yes keyword substitution is not supported in case of sending bulk course email via edX ACE I guess that is because in case of edX ACE file based template is used instead of pulling from DB. You can use open edX theming capabilities to theme/customize your edX ACE templates. You can override default bulk course email template and use any of these variables in your custom template.

course_title
course_language
course_url
course_id
course_image_url
course_end_date
logo_url
platform_name
user_id
email
name

@Zia_Fazal thank you for your reply! Can these be used within the message body or can they only be used within the template? Ideally we would like to enable our instructors and content providers to use these freely within their messages.

@emartus I don’t think these variables can be used in message body.

@Zia_Fazal I was just able to test and confirm these variables cannot be used in the message body. Theming the emails seems straightforward enough, but I will have to see if it will suit our needs in the long term.
I’ve figured out how to switch back to using the basic Django email by setting BULK_EMAIL_SEND_USING_EDX_ACE = False in development.py. This allows for using the keyword variables mentioned in the documentation.

%%USER_ID%%
%%USER_FULLNAME%%
%%COURSE_DISPLAY_NAME%%
%%COURSE_END_DATE%%

From what I’ve been able to tell thus far, the downside is that template can only be managed in Django Admin under Bulk_Email > Course email templates (https://www.example.com/admin/bulk_email/courseemailtemplate/). Here you can either edit/create a template with the name field set to empty which will be used as the default, or create a new named template and add "course_email_template_name":"my_template" to your site configuration.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.