Summary
This article focuses on the required configuration of SendGrid to work with ClinSpark.
SendGrid is an email service provider with an API that allows deep levels of control and feedback for both bulk and transactional emails.
SendGrid is used to support email functionality pertaining to study recruitment workflows and volunteer correspondence. In order to use any of this functionality, a customer-provided paid account must be created, and access shared with the ClinSpark support team in order to perform configuration.
Note: ClinSpark handles system-level notifications (account password reset, MFA, authentication alerts, and lab repeat alerts) using existing AWS SNS capabilities. These system-level messages do not require SendGrid. SendGrid is required for transactional (non-system level) messaging to volunteers and subjects.
Configuration Process Overview
Much like with Twilio, customers must create and maintain their own SendGrid account. A single paid SendGrid account can be used to support any number of customer ClinSpark instances. Ensuring this customer SendGrid account is a paid, non-free account is a precondition of going live in PROD.
Setup Process
Step 1: Customer creates a paid SendGrid account
Customers must create and maintain a paid Email API plan/account with SendGrid.
Free accounts have significant limitations which make them unsuitable for use in PROD settings. This includes limits to the number of emails sent and also in the number of users who can access the account.
For this requirement, we suggest checking the current pricing page for Sendgrid and selecting a plan with the appropriate amount of teammates necessary to administer the account long term.
For the best possible support, we suggest our customers use the Pro subscription level that allows for more than one teammate. This allows multiple ‘admin’ teammates that can be setup and added to the account for long term support, both from customer and ClinSpark team. If a lower level paid account is suitable for your use case and has enough emails included, this can be used as well.
Step 2: Create an API key, share with IQVIA via the ticket
ClinSpark uses an API key for this integration. Please create this key in the Sendgrid UI. Ensure it has full permissions.
Share the API key in the ticket for this integration.
Step 3: Customer DNS Admin provisions a DNS MX record with the desired DNS domain for the email
Emails sent from ClinSpark need to come from a customer-owned non-ClinSpark DNS name.
For instance, you may want to enable Sendgrid integration for Sandbox, VAL and PROD main instances. You will need to decide on what email domains to use for each instance. You need a different domain name for each instance, they can not be shared. Here’s an example:
Environment | ClinSpark Domain Name | Email Domain |
---|---|---|
sandbox-main | customer-sandbox.clinspark.com | sandbox-main-enrollment.customer-domain.com |
val-main | customer-val.clinspark.com | val-main-enrollment.customer-domain.com |
prod-main | customer.clinspark.com | enrollment.customer-domain.com |
The email domains will appear as the From: email in outbound ClinSpark emails. Your users will see these so you probably want to make them informative.
If a recipient of one of these outbound email replies, because of this integration, those replies will be visible in ClinSpark.
Your DNS administrator needs to create a MX record for each of these Email Domains.
If your Email Domain looked like fhvalmail.clinspark.com, then the MX record should look similar to this:
Step 4: Authenticate this Email Domain with SendGrid
This step proves to SendGrid that the user has control of this domain. The instructions for doing this are maintained by SendGrid, and can be accessed through your account. This step must be performed by the customer. It is technical, and typically must be done IT staff who setup the DNS MX record itself.
Please refer to SendGrid’s documentation for this step.
Within SendGrid, here is the sequence of phases to perform this configuration:
Step 4.1: Settings > Sender Authentication
Step 4.2: Click ‘Authenticate Your Domain’
Step 4.3: Configure Settings for Authentication
Step 4.4: Disable Automated Security
Last, follow the instructions to verify domain ownership by making the required DNS entries. Optionally SendGrid will propose to add DNS records for a ‘Verification Subdomain’ (e.g., em1234.mail.customer.com). This ‘Verification Subdomain’ is only used for authentication and verification.
Step 5: Share screenshots for evidence in the ticket
Once the above are complete, the remaining tasks for making the integration live will be taken by IQVIA support. We will on our end provide evidence that the integration is working in the ticket once our tasks are complete.