Blog · Architecture
Data flow diagram (DFD): how to make one, with example
A data flow diagram (DFD) shows how information leaves a source, passes through processes and systems, and reaches a destination or a database. It uses few symbols: external entities, processes, data stores and arrows labeled with the data that travels.
A data flow diagram, or DFD, is a drawing that shows where information moves: where it comes from, what happens to it along the way and where it ends up. It does not describe task order or code. It describes the movement of data.
What is a DFD?
Picture an integration between the company ERP and the sales CRM. A new customer is registered in the CRM, and the ERP needs that record to issue orders. The DFD draws this route: the data starts at the source, goes through a conversion step, is validated and enters the destination. If something goes wrong in the middle, the drawing shows where to look.
The basic symbols
- External entity: who supplies or receives data outside the system (customer, partner, another system). Usually a rectangle.
- Process: what transforms the data (validate, convert, calculate). Usually a circle or rounded rectangle.
- Data store: where data rests (database, spreadsheet, file, queue).
- Data flow: the arrow, always with the name of the data that travels. An unnamed arrow is noise.
You do not have to follow one notation to the letter. What matters is using each shape consistently and adding a legend.
What it is for
- Documenting integrations between systems before building them.
- Finding duplicated data that travels along two different paths.
- Reviewing sensitive points, such as where personal data circulates, to talk with legal and security.
- Investigating an error: "the value arrived wrong in the CRM, at which step did it change?".
How to make one in 6 steps
- Define the scope. Which flow will you map? "Customer registration from CRM to ERP" is a good scope. "All company data" is not.
- List sources and destinations. Systems, people, files, APIs.
- Draw the processes in the middle. Each transformation becomes a piece: validate, convert format, enrich, deduplicate.
- Place the data stores. Where data sits still: a staging database, a queue, a file in a folder.
- Connect everything and name every arrow. "Customer record (JSON)", "Approved order", "Validation error".
- Mark the frequency and the trigger. Real time, hourly, nightly batch. That changes the whole architecture.
Example: from CRM to ERP
A salesperson closes a deal in the CRM. An orchestrator receives the event "deal won (JSON)". It passes the data through a validation process (tax ID, address, payment terms). If valid, it converts to the ERP format and sends the record; if invalid, it writes to the error queue and alerts the team. The ERP returns the customer code, which the orchestrator writes back to the CRM. The drawing shows three things at once: the happy path, the error detour and the return of the data.
DFD, flowchart and architecture diagram
They look alike but answer different questions. The flowchart answers "what is the sequence of steps and decisions?". The architecture diagram answers "which systems exist and how do they connect?", as in the software architecture diagram. The DFD answers "which data goes from where to where?". In integration projects, it pays to have all three, each on its own board.
Common mistakes
- Mixing data with control: the DFD shows information, not the order in which people carry out tasks.
- Forgetting the error path, which is exactly what hurts most in production.
- Not recording who owns each system.
How to keep the drawing useful
Also document what a DFD does not show on its own: the owner of each system, the format of each piece of data and what to do when a step fails. Attach this to the pieces as a link or note. Review the drawing when an integration changes tool or frequency, because an outdated flow is exactly what leads to data errors and arguments about who should have warned whom.
How to do this in Mapyra
In Mapyra, the Integração ERP ↔ CRM com orquestrador template already includes the sources, the orchestrator, error handling and the return of the data. Swap the names for your own systems, label every arrow with the data that travels and add the documentation link to each piece. Start with Mapyra and share the board with whoever maintains each system.
Frequently asked questions
What is the difference between a DFD and a flowchart?
A flowchart shows the sequence of steps and decisions in an activity. A DFD shows the path of data between sources, processes and stores, without caring about task order. One describes what people do, the other describes what circulates.
What is a data store in a DFD?
It is any place where data rests between two processes: a database, spreadsheet, file in a folder, queue or cache. Showing stores helps you see where data can become stale, duplicated or exposed.
How many levels should a DFD have?
Start with an overview called the context level, with the system in a single box. Then detail the main processes in following levels. Stop when the drawing answers the team question, without opening what nobody will consult.