Skip to main content

Mailchimp with Geins Webhooks

This guide demonstrates how to set up a webhook to send an email with mailchimp on various events an order can go through in Geins.

Introduction

Mailchimp is a popular email marketing platform. It provides a platform for sending marketing emails to customers. Mailchimp also supports webhooks, which can be used to send emails to customers. This can be useful for sending notifications about events in geins, such as when an order is locked or when a new customer is created.

Setting up webhook for locked order

This example demonstrates how to configure a webhook to send an email with mailchimp when an order gets locked. The email will include a link to the OMS for more detailed information about the order.

  • Step 1: Please refer to Mailchimp documentation
  • Step 2: Set up the webhook to listen for lock actions on the Order entity.

cURL Example

Use cURL to create the webhook
curl -X POST "https://mgmtapi.geins.io/API/Webhook" `
-H "Content-Type: application/json" `
-H "X-Apikey: api-key" `
-u "user:password" `
-d '{
"Entity": "Order",
"Name": "Order Notification email",
"Description": "Notifies when an order is locked",
"Actions": "lock",
"Method": "POST",
"Url": "https://mandrillapp.com/api/1.0/messages/send",
"Body": "{\"key\": \"YOUR_MAILCHIMP_API_KEY\", \"message\": {\"from_email\": \"[email protected]\", \"subject\": \"order {{id}}\", \"text\": \"<a href='https://webshop.admin.geins.io/Admin/Order/Edit/{{id}}'>Order Details</a>\", \"to\": [{ \"email\": \"[email protected]\", \"type\": \"to\" }]}}",
"Headers": "Content-Type: application/json",
"Retry": true
}'