---
title: "What happens when a customer places an order"
space: "Integrations"
url: "https://integrations.frappe.cloud/integrations/ecommerce-integration/shopify/what-happens-when-a-customer-places-an-order"
updated: "2026-07-29"
---

When a customer completes checkout on **Shopify**, the order is sent to **ERPNext** through a webhook. ERPNext then creates the corresponding documents and updates them as the order moves through its lifecycle. The sync flow keeps Shopify orders and ERPNext transactions connected, ensuring that order updates are reflected across both systems.

## The webhook events ERPNext listens for

![Shopify Setting - Webhooks Details, the events ERPNext listens for.](/files/shopify-webhooks.png)

Each event maps to one action in ERPNext:


| Shopify event                | What ERPNext does                        |
| ---------------------------- | ---------------------------------------- |
| `orders/create`              | Creates a **Sales Order**                |
| `orders/paid`                | Creates a **Sales Invoice** (if enabled) |
| `orders/fulfilled`           | Creates a **Delivery Note** (if enabled) |
| `orders/partially_fulfilled` | Creates a **Delivery Note** (if enabled) |
| `orders/cancelled`           | Cancels the linked documents             |


The Sales Invoice and Delivery Note are only created if you enabled them in *Order Sync Settings*.

## How it stays reliable

Every Shopify **webhook** is received at the **ERPNext webhook endpoint**, where it is:

- **Verified** using the configured **Shared Secret**.
- **Recorded** as an **Ecommerce Integration Log** entry for tracking and troubleshooting.

The actual synchronization runs as a **background job**, ensuring that webhook events are queued and processed reliably even if Shopify is slow or ERPNext is under heavy load.

As customers place orders on **Shopify**, corresponding **Sales Orders** are automatically created in **ERPNext**. Each Sales Order includes the **Shopify Order Number** and its status is updated throughout the order lifecycle until it reaches **Completed**.

![Sales Orders appearing in ERPNext as customers check out on Shopify.](/files/shopify-synced-sales-order.png)