HomeDFD examples › Online Shopping System

DFD for Online Shopping System

Context diagram and Level 1 DFD for a online shopping system, explained step by step, and ready to edit in the browser.

An online shopping system (e-commerce website) is a popular project topic because it has several outside parties: customers, sellers, a payment gateway and a courier. Its DFD shows how orders and payments move between them.

Below you'll find the context diagram (Level 0) and the Level 1 DFD, with every entity, process, data store and data flow explained. Open either one in the editor to change it for your own project.

Context diagram (Level 0)

Context diagram (Level 0 DFD) for Online Shopping System

Context diagram for the online shopping system: the whole system as process 0, with its external entities.

External entities

  • Customer: Browses products, places orders, pays and receives confirmations and invoices.
  • Seller: Adds product details and receives order notifications.
  • Payment Gateway: Processes online payments (UPI, cards, net banking) and returns the payment status.
  • Delivery Partner: Receives shipping details and sends back delivery status.

Data flows in the context diagram

FromToData flow
Customer0 Online Shopping SystemOrder & payment details
0 Online Shopping SystemCustomerCatalogue, confirmation & invoice
Seller0 Online Shopping SystemProduct details
0 Online Shopping SystemSellerOrder notification
0 Online Shopping SystemPayment GatewayPayment request
Payment Gateway0 Online Shopping SystemPayment status
0 Online Shopping SystemDelivery PartnerShipping details
Delivery Partner0 Online Shopping SystemDelivery status

Level 1 DFD

Level 1 DFD for Online Shopping System

Level 1 DFD: process 0 broken into its main processes, with the data stores they use.

Processes

ProcessWhat it does
1.0 Browse ProductsShows the product catalogue from the products store.
2.0 Place OrderRecords the order, confirms it to the customer and passes the amount to payment.
3.0 Make PaymentSends the payment request to the gateway, records the payment and issues the invoice.
4.0 Ship OrderShips paid orders through the delivery partner and notifies the seller.
5.0 Manage ProductsSaves product details from sellers.

Data stores

  • D1 Products: Product catalogue, prices and stock.
  • D2 Orders: Every order and its status.
  • D3 Payments: Payment records and confirmations.

All data flows in the Level 1 DFD

FromToData flow
Seller5.0 Manage ProductsProduct details
5.0 Manage ProductsD1 ProductsProduct record
D1 Products1.0 Browse ProductsProduct list
1.0 Browse ProductsCustomerProduct catalogue
Customer2.0 Place OrderOrder details
2.0 Place OrderD2 OrdersOrder record
2.0 Place OrderCustomerOrder confirmation
2.0 Place Order3.0 Make PaymentOrder amount
Customer3.0 Make PaymentPayment details
3.0 Make PaymentPayment GatewayPayment request
Payment Gateway3.0 Make PaymentPayment status
3.0 Make PaymentD3 PaymentsPayment record
3.0 Make PaymentCustomerInvoice
D2 Orders4.0 Ship OrderPaid order
D3 Payments4.0 Ship OrderPayment confirmation
4.0 Ship OrderDelivery PartnerShipping details
Delivery Partner4.0 Ship OrderDelivery status
4.0 Ship OrderSellerOrder notification

Is it balanced?

Yes. Every external entity in the context diagram also appears in the Level 1 DFD, and the data going in and out matches. For example, the flows to and from Customer in the context diagram are split into more specific flows on Level 1. Both diagrams also pass DrawDFD's rule checker, with no black holes, miracles or unused data stores.

Tips for your project

  • Cart, returns and reviews are common extra processes. Add a Cart data store if you model 2.0 in a Level 2 DFD.
  • An Admin entity that approves sellers is another common extension. Remember to balance it with the context diagram.
Level 2: pick the most complex Level 1 process and draw its steps on a new diagram, numbered like 2.1, 2.2, 2.3. Use a System boundary shape labelled with the parent process. How to draw a Level 2 DFD →

More DFD examples

Ready to draw your DFD?

Open the free editor. No sign-up, and you can start from any example.

Open DrawDFD