blog

Email Automation Made Easy with DevRev: The Integration to Streamline Your Conversations!

7 min read

Last edited:  

Email Automation Made Easy with DevRev: The Integration to Streamline Your Conversations!
Nandhini
Nandhini

Email: The must-have communication

Good customer service is the key to success in any business. And while dealing with your customers face to face or over the phone may be ideal, much of it can also be done through email communication.

As a tech professional, you know how quickly issues and project requests can pile up - and that’s why having an effective email system in place so that all interactions with customers can be tracked is essential if you want to keep things running smoothly.

In this blog post, we’ll discuss how email integration for customer emails will enable you to deliver excellent service without losing track of important topics or details.

Why is email integration important?

Email is a popular channel for customers (Revs) to contact organizations (Devs). Organizations usually have “support@{devorg}” addresses, but managing communication across email and conversations can be difficult and lead to a loss of context and disconnected ticket management. Benefits of managing communication include:

  • Capturing Leads: The metadata of an email from a lead can be used to register the customer in the organization (RevU in the DevO).
  • Managing Customer Queries/Conversations: Emails can be redirected to create new conversations or directly create tickets in the organization (DevO).

Terminologies

Knowing the roles, work items, and communication tools related to customer support is paramount to understanding how an organization functions. This includes understanding the relationship between customers, employees, tickets and issues, as well as knowing the tools used to facilitate communication such as PLuG Widget conversations and emails. Knowing these concepts can help an organization maximize its efficiency when communicating with customers.

Let’s dive into some key concepts that will help you further your customer communication to a new level.

  • DevOrg (DevO): The organization that owns the product
  • DevUser (DevU): Members of the DevOrg
  • RevOrg (RevO): Customer organization of the DevOrg in case the DevOrg is a B2B company
  • RevUser (RevU): Customers of the DevOrg in case the DevOr is a B2C company and employees of the RevOrg in case the DevOr is a B2B company
  • Ticket: A work item created as a consequence of a feedback from a customer
    Issue: A work item created as a consequence of a ticket or bug
  • PLuG Widget: A tool that can be easily installed on your site, giving your customers a simple way to search your knowledge base and/or contact you.
  • Conversation: Refers to the conversation object in our data model. It can be a PLuG widget conversation or originate from an email.

The email pipeline

The email integration pipeline is a three-step process:

  • Email Ingestion: Gathering emails from external sources such as customers and third parties.
  • Object Creation and Event Publishing: Creating objects from these emails, such as tickets and issues, as well as publishing events associated with them.
  • Flows: Defining the workflow for managing customer communications through the integration pipeline.

Email ingestion

This phase involves the transfer of emails from the DevO’s mail server to AWS Lambda. This architecture is used to set up an automated connection between two companies so that they don’t need to invest time and money in setting up and utilizing a REST service.

Introduction to event publishing

Event Publishing is a process of setting up an event-driven architecture in which events are published to different channels.

Whenever a RevU sends an email to the DevO’s mail server, it is forwarded to a particular email address that we provide them when they install our flow. The domain for this email address would be registered with SES.

SES

Amazon SES is an affordable, flexible and scalable email service for developers to send and receive emails. It allows for recipient-based control with rules that define a set of actions taken based on the recipient. In our receipt rule, when an incoming email matches the registered domain, we store it in an S3 bucket and trigger a Lambda function.

S3

Amazon S3 is an object storage service, making it ideal for first or second-level storage. Data can be read from S3 in AWS Lambda with aws-sdk. We chose to store the raw email in an S3 bucket because its size (including attachments) won’t become a bottleneck. If any errors occur in the pipeline, this S3 object can be used as a reference for debugging; if not, it’s deleted eventually.

Lambda

Lambda is a compute service that runs code without requiring servers. We can build AWS services’ data-processing triggers with Lambda functions, which run only when triggered by an event. This event-driven feature effectively manages web traffic, scales the load autonomously, and allows you to quickly complete tasks like backups, reporting, and data transformation.

Our Lambda function does the following:

  • Gets the SHA-256 signature of the raw email.
  • Extracts the source email address.
  • Makes an HTTP call to a gateway with additional fields in the header (X-Devrev-Signature-256 and X-Devrev-Email-Sender).

Gateway then calls Blubox’s TriggerEventSource API.

Error handling

The following table shows gateway responses and their attached actions.

Gateway responseAction
200Return normally
4xxLog error and return normally
5xxLog and Return

Object Creation and Event Publishing

Blubox

Blubox is a software application designed to compress and encrypt digital files like photos, videos, and documents. It can help save storage space and protect them from unauthorized access.

Here, we added a new event source type in Blubox. This type of event triggers the following actions:

  • Calculates the SHA-256 signature of the gateway request body and compares it to the X-Devrev-Signature-256 header field.
  • Checks if the source email address is one of the accepted addresses in a whitelist.
  • Parses the email and performs the following tasks:
    • Creates artifacts for any attachments and for the entire raw email.
    • Extracts relevant fields from the raw email.
    • Constructs an email event object using these fields.
    • Publishes this event.

Fields of interest

Email fields of interest can be used to create automated customer workflows, with triggers and crucial information to help better assist customers. These various fields include sender name/address, subject, body text/content, date sent, etc. All of these provide important insights into customers’ needs and wants that can be used to enhance customer service.

  • Email Body: The main content of the email.
  • Subject: The one-line summary of the email.
  • MessageId: A unique identifier for each email message.
  • Date: The date and time the email was sent or received.
  • To: The address of the recipient who will receive the email.
  • Cc: Carbon copy, a list of recipients who will also receive a copy of the email.
  • From: The address from which a given message originated.
  • InReplyTo: References the email to which a message is replying to.
  • References: Identifies other emails referred to in this particular message.
  • ReplyTo: An alternate address to which responses can be sent, instead of directly back to the sender.

Email is a powerful tool for creating automation workflows with DevRev that provide enhanced customer service. This is just the beginning of what can be accomplished with email communication and there are many more ways to help further strengthen customer satisfaction and loyalty. With the right tools, improved customer experiences can be created to benefit everyone involved.

If you’re interested in utilizing DevRev to create automated customer workflows with triggers, body text, and more, don’t wait. Visit the DevRev website now for a demo or call a real tech professional for more information. Don’t miss out on this great opportunity - start taking advantage of the amazing capabilities of automated email workflows today!

Nandhini
Nandhini

I’m Nandhini, a content writer and storyteller with a passion for helping businesses grow. I believe that powerful stories and well-optimized content are the keys to organic growth, and I’m here to make that magic formula work for DevRev.