Integrate email
From initial registration to receiving order updates, emails are an essential tool in communicating with your customers. With commercetools Connect, you can easily implement a system to send emails to customers based on their account and order status. This guide introduces you to commercetools Connect and demonstrates how you can use it to streamline the integration of emails into your Composable Commerce Project.
What is commercetools Connect
commercetools Connect lets you integrate functionality into your Project without needing to buy and maintain dedicated hosting or runtime environments. The Connect Marketplace provides many off-the-shelf integrations available to meet various requirements, and you can even develop and deploy your own custom integrations.
How to integrate emails into Composable Commerce
When Customers and Orders in Composable Commerce are created and modified, they generate Messages that you can subscribe to. For example, when a customer signs up, Composable Commerce creates and sends a CustomerCreated Message. This Message contains a reference to the new Customer and their sign-up date. With this information, you can create and send a personalized welcome email to your new customer.
You can automate the sending of common types of emails upon receiving the following Messages:
Type of email | Message to subscribe to |
---|---|
Customer registration | CustomerCreated |
Email verification | CustomerEmailTokenCreated |
Password reset | CustomerPasswordTokenCreated |
Order confirmation | OrderCreated |
Order updates | OrderStateChanged |
Order refunds | ReturnInfoSet |
How commercetools Connect helps
Receiving and reacting to these Messages requires having a system that receives these Messages, and then passes on data to another system to create and send the emails.
With commercetools Connect, you can deploy ready-made integration or create your own to perform these tasks. commercetools Connect provides the hosting and runtime environment, allowing you to focus on the business logic behind sending your emails.
Use an existing integration
commercetools Connect provides ready-made integrations for email which can be easily managed and deployed on infrastructure provided by commercetools. You can visit the Connect Marketplace to see available integrations.
Create your own integration
commercetools Connect also enables you to create and deploy your own custom integrations. Our development templates provide examples for subscribing to Messages. You can also include business logic and API calls to your email provider to send customized emails. Learn more in our Connect guides.
Your integration may require additional configuration values and environment variables, such as API client credentials or account information from third-party services. You can include these configurations and their values when using the Connect API to create and deploy your integration.
Once published and deployed, your integration will receive the messages it has subscribed to and run the business logic required to send emails.
Recommended email providers
Sendgrid, Klaviyo, MailJet, and MailChimp are some of the platforms that provide email marketing solutions to businesses. Some email providers are simple transactional email platforms focused on bulk email campaigns, newsletter management, and transactional emails. Other email providers are fully featured marketing automation solutions designed to help businesses grow their sales through targeted and personalized campaigns that leverage customer behavior data. When using email systems that are more data-driven, consider using Change Subscriptions to sync all Customer, Order, Product, and Category data when they are created, updated, and deleted.
Conclusion
In this guide, we outlined how you can leverage commercetools Connect to send emails to customers. If you have any further questions about commercetools Connect, contact your Customer Success Manager.