Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Email Styling Enhancements #1596

Closed
3 tasks done
craigyu opened this issue Sep 17, 2024 · 11 comments · Fixed by #1608
Closed
3 tasks done

Implement Email Styling Enhancements #1596

craigyu opened this issue Sep 17, 2024 · 11 comments · Fixed by #1608
Assignees
Labels
Email notification UX Improvements Category label from https://apps.nrs.gov.bc.ca/int/confluence/x/VoC9CQ

Comments

@craigyu
Copy link
Collaborator

craigyu commented Sep 17, 2024

Describe the task
Spike done in #1552
Make the email template more scannable

Acceptance Criteria
we want to:

  • show roles as the display name (not db names) for example, "Submitter", "Reviewer", etc
  • add organization names associated with client numbers
  • add a bullet for each role + client number

mockup for the desired changes:
Image

Image

Context:
GC Notify's reply (Their respond speed is impressive!).

Hi Ian,

Unfortunately, we don't natively support what you are trying to achieve. Also, we don't support HTML content in templates or variables. 

However, if you are using the API, you could dynamically create the content of a variable in your own code to fit the what you need. You would put in a variable the desired content using the same formatting than you would in a template. 

In your code, you build something like this variable = "* Item 1\n* Item 2\n* Item 3" (dynamically built from the number of items you have). Use the \n new line character between your items. 

And in the template, you would put ((variable)) which will take the content you pass it from the API. 

JSON payload:

{
  "email_address": "recipient@email.com",
  "template_id": "aaaaaa-bbbb-ccc-dddd-11111111111",
  "personalisation": {
    "variable": "* Item 1\n* Item 2\n* Item 3"
    }
}

Let us know if this works. 

Regards,
Jimmy P.
The GC Notify Team
@ianliuwk1019
Copy link
Collaborator

Hi @OlgaLiber2 , do you have mockup for the FOM Submitter role with organization?
Thanks.

@craigyu
Copy link
Collaborator Author

craigyu commented Sep 19, 2024

Possible client info formats

CanFor Inc (0074124214)

CanFor Inc [0074124214]

0074124214 - CanFor Inc

CanFor Inc - 0074124214

@OlgaLiber2 OlgaLiber2 added Email notification UX Improvements Category label from https://apps.nrs.gov.bc.ca/int/confluence/x/VoC9CQ labels Sep 20, 2024
@OlgaLiber2
Copy link
Collaborator

@ianliuwk1019 I updated the mockup. Let me know if you have any questions.

@ianliuwk1019 ianliuwk1019 self-assigned this Sep 20, 2024
@ianliuwk1019
Copy link
Collaborator

Hi @OlgaLiber2 , in delegated admin email template enhancement, do you intend to remove this statement (it was in first version)?
As a delegated admin, you are required to comply with our terms and conditions.

@ianliuwk1019
Copy link
Collaborator

As discussed, we will keep the T&C for delegated admin template and show only for BCEID user.
Hi @OlgaLiber2 , do you want to add username display in template as:
e.g. Hello Bceid User (username: bceidtester)

@ianliuwk1019
Copy link
Collaborator

Hi @OlgaLiber2 ,
GC Notify does not have way to add few empty lines between paragraph. I tried several combinations and attempts and did not work.
I will need to send email to their support to ask the possibility.

Do you have the hyper link to the Terms and Conditions so I can add to the template?

@ianliuwk1019
Copy link
Collaborator

ianliuwk1019 commented Sep 25, 2024

Hi @OlgaLiber2 ,
If we don't have the T&C pdf stored as a truth source and has a hyperlink to be included (to open) for the email template, then GC Notify can do it as sending a file (within the email sending).
I looked into GC Notify doc, it has two modes for sending files (attachment mode and link mode):
Image

Either way it needs the file (pdf) to be converted into into based64 encoded format and send it to the template by code (our FAM backend):
Image

I assume we don't like to store the pdf into our project repository, if that's the case, maybe I need to use online tool to covert this pdf into base64 string and deposit it into code to send to GC Notify for email template. Is there a concern for this approach?
@basilv @craigyu

@OlgaLiber2
Copy link
Collaborator

@ianliuwk1019 if it helps at all with the conversion I also have a doc version of T&C

@ianliuwk1019
Copy link
Collaborator

@ianliuwk1019 if it helps at all with the conversion I also have a doc version of T&C

Thanks @OlgaLiber2 , pdf is good.
Conversion isn't the problem. We can try the converted string and test it how it look when GC Notify include the file (T&C) in email sending. The question is more on

  • if there is any concern if we save the converted data in code/repository (as you might have reason not to deposit the original T&C in a site like confluence that can have a link to be included in the email template).
  • if there is any concerns(privacy/security) if I use online tool to convert the pdf.

I might be wrong, but if this T&C is to be seen among BCEID users (public), then it is probably no concerns with the T&C being saved in code (converted Base64 string).

@basilv
Copy link
Collaborator

basilv commented Sep 26, 2024

No privacy concerns with converting T&C doc online. No concerns on my end with storing it in code/repo - we just need to document the process for how to change the T&C contents in the future.

@ianliuwk1019
Copy link
Collaborator

ianliuwk1019 commented Sep 26, 2024

About adding few extra blank lines in between, seems GC Notify currently has no way to do it and they are looking into it:
Image

We can for now have the template without the extra few lines and adjust the template when GC Notify has the solution.


Update:
GC Notify has now provide an work around for us:
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Email notification UX Improvements Category label from https://apps.nrs.gov.bc.ca/int/confluence/x/VoC9CQ
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants