NYC COVID-19 Rapid Response Coalition helps MetroPlus Health Plan partner to address the health and social needs of thousands at risk

May 12, 2020 Shoshanah Brown

With COVID-19 continuing to impact citizens globally, many individuals have been required to shelter-in-place to reduce the spread of the virus. While this has reduced the exposure risk for COVID-19, it has created social- and health-related challenges for individuals, such as access to healthy food, social service supports, and healthcare.

To lessen the strain on New York City’s overburdened hospital emergency departments and intensive care units, leaders from social services, healthcare, and technology organizations came together in March to create the NYC COVID-19 Rapid Response Coalition. The coalition extends treatment and services to high risk, chronically ill, and underserved New Yorkers in need of at-home care and services.

One of the many organizations in the coalition is MetroPlus Health Plan (MetroPlusHealth), which insures over half a million adults and children across New York City. Early in the COVID-19 crisis, the MetroPlusHealth team identified approximately 85,000 at-risk individuals (e.g., comorbid heart or lung disease, or immunocompromised) who would require additional support services while sheltering in place. In order to engage and address the needs of this high-risk population, MetroPlusHealth needed to quickly develop capabilities to connect each individual with the right resource to ensure their specific needs were met.

MetroPlusHealth wanted to focus on several areas; emotional support, access to a medical provider, pharmacy refills, and challenges with accessing food and unemployment support. The team worked closely with their partners, including a local data-driven Community-Based Organization (CBO) called AIRnyc, which deploys Community Health Workers to help people navigate the health and social care landscape. Together, the organizations worked to identify resources for each of these issues, leveraging both existing support systems like the NYC COVID hotline, the COVID Emotional Wellness line, MetroPlusHealth’s telehealth vendor, and the staff from the MetroPlusHealth’s pharmacy customer phone lines.

AIRnyc, MetroPlusHealth, AWS, and a pro bono team from Bain & Company worked iteratively to design, deploy, and refine the engagement process over a three-week period, which included SMS campaigns that reached up to 10,000 members a day, connecting them to available resources. After the initial pilot, MetroPlusHealth care managers began leveraging a CBO referral platform, called NOW POW, and existing MetroPlusHealth contracts and relationships with food delivery services, including God’s Love We Deliver. As a result, thousands of at-risk individuals were connected with necessary services while reducing their exposure to COVID-19.

MetroPlusHealth’s Deputy Chief Medical Officer Amanda Parsons, MD, MBA states, “We are always concerned about the health and well-being of all our members, but when a crisis like COVID-19 hits, we know the most vulnerable and high-risk are disproportionately impacted. In a matter of days, we were able to deploy a solution that enabled us to reach individuals at high risk for poor COVID-19 outcomes and identify, and address, their health and social risks during this crisis.”

To connect with New Yorkers in need, MetroPlusHealth worked with AWS Professional Services and solutions architects to build a SMS-based chatbot solution. The chatbot leverages several AWS services including Amazon Pinpoint, Amazon DynamoDB, Amazon Connect, Amazon Lex, and AWS Lambda. Amazon Pinpoint, a highly scalable and globally distributed service helped MetroPlusHealth reach out to tens of thousands of individuals by SMS while Amazon Connect enabled a two-way connection with the wellness support executive without requiring the user to dial a phone number. Amazon Lex, which uses the same deep learning technologies as Alexa, works as a foundation for the conversational interface. Amazon DynamoDB, a high performance and fully managed NoSQL database service is used to store user responses while AWS Lambda, a serverless compute service enabled the solution to scale without worrying about the computational needs when running large campaigns.

This blog post provides step-by-step guidance on how to deploy a similar solution for your organization to support outreach and engagement with your communities and populations. Additionally, this blog post explains how to add other languages, such as Spanish, to the chatbot to engage with a more diverse population while complying with government regulations and guidelines within the US and internationally.

Process flows and architecture

AWS allows services to be integrated creating a flexible solution that can meet your needs. In this use case, we built upon a previous architecture for clinically validated conversational agents by introducing a flexible way to change the dialog of the Amazon Lex chatbot and integrate Amazon Connect to allow individuals to be connected with any Contact Center.

Building upon that use case, Amazon Pinpoint was incorporated into the architecture along with the other services including Amazon Lex, Amazon DynamoDB, Amazon S3, Amazon Connect, and AWS Lambda. Business stakeholders within an organization can work with administrators to create a scripted dialog flow and upload them as comma-separated values (CSV) files. The questions are then ingested into a DynamoDB table where the chatbot can read relevant questions based on responses from individual users. Using Amazon Pinpoint, an outreach campaign initiates the interaction with individuals, with the goal of informing them about available resources. The service can then facilitate a connection to a specific contact center, where an agent is available to assist with their needs. This approach reduces the time and effort required by individual contact center employees, who would otherwise be required to reach out manually to connect those in need with available resources.

Deployment steps

This section explains the step-by-step guide on how to deploy the chatbot solution.

Step 1: Set up the Amazon Pinpoint project

  1. Navigate to the Amazon Pinpoint from the Services tab in AWS Management Console and create a new Amazon Pinpoint project.

  1. Click the configure button under “SMS and voice” to enable the SMS channel for the project and set the Default message type to “Transactional.” Refer to the documentation to learn more.

  1. Next step is to request the long code (phone number) which will be used by Amazon Pinpoint to send the text messages. Choose Advanced configurations – optional and select Request long codes. You can find more information here.

  1. Since the chatbot will be require to send and receive messages, enable two-way SMS feature for the long code.  Click on the Long Code number and select the checkbox next to “Enable two-way SMS.” Under Incoming message destination, choose Create a new SNS topic, and name it “SMSChatBotSNSTopic.” For more information about setting up two-way SMS, click here for documentation.

  1. Copy the Project ID from the Amazon Pinpoint console and save it in a notepad. You will need it later.

Step 2: Set up the questions template

  1. Download the file SMSChatBotQuestions.csv and update the questions as per your requirements and endpoints.
  2. Notice that the values in “When yes” and “When no” columns controls the conversation flow.
  3. If the multi-lingual support is required, add the translated questions at the end of the English ones. As shown in the template, if the user choose Spanish language as a preferred language (question 2), the control is passed to Spanish language questions.

Quick tip: Ensure that the CSV is saved in the UTF-8 format.

Step 3: Deploy code and services

As the above architecture suggests, the chatbot uses several AWS services – Amazon Pinpoint, Amazon S3, Amazon DynamoDB, Amazon Lex and, AWS Lambda. This post leverages AWS CloudFormation to make the deployment easier.

  1. Download the code artifacts required for this solution. Now upload the files (,, to a S3 bucket in your AWS account. You can use an existing or create a new one. For example, I have created a code bucket named “sms-chatbot-artifacts.”
  2. Login to your AWS account and click the following button to launch an AWS CloudFormation stack in us-east-1, and choose Next.

    Click to launch

  3. On the “Specify stack details” screen all the information will be pre-populated as shown in the screenshot below. Click Next.
  4. Settings on the Configure stack options page are optional, click Next.
  5. Select all acknowledgment boxes, and click Create Stack. It will take couple of minutes for the AWS CloudFormation to deploy all the resources. Once the Stack is successfully created, on the Resources page, save the Physical ID of LexBotCodeHookFunction.
  6. Go to TemplateBucket by choosing Physical ID of TemplateBucket and upload the questions CSV file SMSChatBotQuestions.csv file downloaded in Step 2 to the S3 bucket. Refer to this documentation if you need help with S3 console.
  7. Open the SMS-Chatbot-Pinpoint Lambda and click “Add Trigger” button. In the Trigger configuration, select SNS and then select “SMSChatBotSNSTopic.” You created this SNS topic during the Amazon Pinpoint project setup in Step 1.
  8. Click the “Edit” button next to Environment Variables and update the value for “PinpointApplicationId” variable. You saved the Project ID in Step 1.

Step 4: Set up Amazon Lex chatbot

  1. Next step is to set up an Amazon Lex chatbot. Download the zip archive file. From the Services menu, navigate to the Amazon Lex console. Click the Actions button and select Import and choose from your computer. If you need more information, check the documentation on Importing in Amazon Lex Format.
  2. Click on SMSChatBot to Edit the bot. Click on the first intent name and select SMS-ChatBot-CodeHook Lambda function drop-down within the dialog and fulfillment sections. Repeat this for all the intents in the bot. For Version or alias of code hook, choose Latest. For each intent:
    • In Lambda initialization and validation (dialog code hook), select Initialization and validation code hook and select the Lambda.
    • In Fulfillment (fulfillment code hook), select AWS Lambda function and select the Lambda. Don’t forget to select Save after making the changes for each intent.
  3. Choose Build to start the Amazon Lex chatbot building process. After build was successful, you can test the chatbot by choosing Test Chatbot bar on the right side.
  4. Choose Publish and provide “smsBot” as an alias for your bot.
  5. You can test the bot using the Test Chatbot section on the right.

Step 5: Set up two-way connect

The two-way connect feature can be helpful if your conversational flow requires user to contact a call center or other helpline number. It leverages Amazon Connect to connect user to a phone number. This feature is optional and you can skip this section if don’t need a two-way connect.

Here are the setup steps:

  1. In the SMSChatBotQuestions.csv file, set the “Question Type” to “Transfer” for the question that will connect users phone to the helpline number. Upload the file back to the S3 bucket.
  2. Download this Connect Flow. You will need this after later in this setup.
  3. Navigate to Amazon Connect console and create an Amazon Connect instance in the US East (N. Virginia) Region. Next you need to claim a phone number for the instance. For more information, see Getting Started with Amazon Connect.
  4. In Amazon Connect Console, login to your Connect Instant. In left side bar, choose Routing, Contact flows. Then choose Create Contact Flow.
  5. Next choose “Import flow(beta)” and import the Connect Flow.
  6. Choose Save and then Publish.
  7. Expand the “Show additional flow information” and copy the Connect Instance Id and Contact Flow Id in a notepad. Now edit the Environment Variables in “SMS-ChatBot-CodeHook” Lambda with Connect information as shown below.

The solution is now deployed and you can test the bot by sending “Hi” to the phone number you provisioned using Amazon Pinpoint.


During this unprecedented crisis, technology and tools like the SMS chatbot can provide healthcare organizations like MetroPlusHealth with the ability to engage with their members, patients, and at-risk communities in a scalable manner. Enabling solutions such as the one described in this blog enables organizations to scale their engagement channels for outreach, identify critical needs across the population, and connect individuals to organizations that can help them address their health or social needs such as access to healthy foods or mental health services. Although this post is centered around the current COVID-19 pandemic, this solution can be used to implement an outbound SMS engagement strategy for other scenarios and can be mapped to a broader set of opportunities for healthcare payers and providers to address condition management, wellness campaigns, or population health management.

Stay well.


Building clinically validated conversational agents to address novel coronavirus

SMS Chatbot with Amazon Pinpoint and Amazon Lex

Previous Article
Leveraging healthcare chatbots at your digital front door
Leveraging healthcare chatbots at your digital front door

Innovations in industries like retail, communication, transportation, and entertainment, have forever chang...

Next Article
Global OHDSI COVID-19 Study-A-Thon Produces Important Insights
Global OHDSI COVID-19 Study-A-Thon Produces Important Insights

What happens when a pandemic cancels your annual scientific meeting? You improvise. The Observational Healt...