This past December, the workers’-rights organization China Labor Watch published a report about conditions in Chinese toy factories. Photographs showed workers—who are forced to sign blank contracts, work overtime, and go without safety equipment—slumped over assembly lines and sleeping in hallways. One image showed the exact American Girl doll that I’d been considering buying as a Christmas present for my six-year-old daughter. I surveyed her toys, strewn jubilantly around the living room: a Cool Maker Sew N’ Style machine, made in Vietnam; a Klutz Make Your Own Soap science kit, made in Taiwan; a pair of Kuxuan Doodle Design roller skates, made in China. The factories highlighted by China Labor Watch have made toys for many companies, including Hasbro, Disney, Lego, and Mattel. How could I know which had been made ethically and which hadn’t?

Answering this question can be surprisingly difficult. A few years ago, while teaching a class about global labor at the University of California, Los Angeles, I tried assigning my students the task of analyzing the “supply chain”—the vast network of factories, warehouses, and shipping conduits through which products flow—by tracing the components used in their electronic devices. Almost immediately, I hit a snag: it turns out that even companies that boast about “end-to-end visibility” and “supply-chain transparency” may not know exactly where their components come from. This ignorance is built into the way supply chains work. The housing of a television, say, might be built in a small factory employing only a few people; that factory interacts only with the suppliers and buyers immediately adjacent to it in the chain—a plastic supplier on one side, an assembly company on the other. This arrangement encourages modularity, since, if a company goes out of business, its immediate partners can replace it without consulting anyone. But it also makes it hard to identify individual links in the chain. The resilient, self-healing quality of supply chains derives, in part, from the fact that they are unsupervised.

When people try to picture supply chains, they often focus on their physical infrastructure. In Allan Sekula’s book “Fish Story,” a volume of essays and photographs produced between 1989 and 1995, the writer and photographer trains his lens on ports, harbors, and the workers who pilot ships between them; he reveals dim shipboard workspaces and otherworldly industrial zones. In “The Forgotten Space,” a documentary that Sekula made with the film theorist Noël Burch, in 2010, we see massive, gliding vessels, enormous machines, and people rummaging through the detritus around ports and harbors. Sekula’s work suggests the degree to which our fantasy of friction-free procurement hides the real, often gruelling, work of global shipping and trade.

But supply chains aren’t purely physical. They’re also made of information. Modern supply-chain management, or S.C.M., is done through software. The people who design and coördinate supply chains don’t see warehouses or workers. They stare at screens filled with icons and tables. Their view of the supply chain is abstract. It may be the one that matters most.

In the S.C.M. space, a German company called SAP is the market leader. Its name stands for Systeme, Anwendungen, und Produkte, or Systems, Applications, and Products. You can’t download SAP from the app store; it’s an enterprise-wide suite of software, which includes modules for accounting and human resources and needs to work in tandem with a large database. It’s possible, though, to take a class online. A Texas-based company called LearnSAP offers an online training course, which includes access to demo software. The course takes forty hours and costs a thousand dollars. Last summer, I signed up. (SAP also offers free introductory training sessions on a platform called openSAP.)

Before I logged in for the first time, I assumed that I’d be one of many students. In fact, the class was one on one. My instructor, Enugula Srinivasa Rao, lived in India, where he had a day job as a supply-chain manager for a large company. Every night for forty nights—8 P.M. for me, 9:30 A.M. for him—Rao and I met online. His manner, elaborately courteous and infallibly patient, inspired a similar politeness in me, so that we often performed a dance of apologies and thank-yous while navigating SAP’s screens.

The newest versions of SAP are sleek and colorful. But the version that I trained on—SAP SCM 7, the one that’s most widely used—has a bare-bones interface, with a look and feel that evokes Microsoft Windows circa 1997. The main screen shows a cascade of file folders, each housing an array of “transactions”—individual tasks, such as ordering, manufacturing, packing, and shipping—that a manager can fit together to form a supply chain. Devising a chain is a multi-person process involving several different SAP “components.” Into one component, a “demand specialist” enters information about past sales, seasonal variations, planned promotions, and the like; the software calculates how many products need to be made. In another, a “supply-chain specialist” uses information about shipping times, storage costs, factory capacities, and so on to create a “supply-network plan,” which dictates when each gear in the manufacturing process must turn. This high-altitude plan is then transmitted to another specialist who works in a component called PP/DS, for Production Planning and Detailed Scheduling. The PP/DS component determines how the process will unfold on the ground, allowing for the scheduling of work shifts and product movements in intervals as small as a second.

The PP/DS component looks as blandly institutional as the rest of SAP. It’s more or less a series of spreadsheets, check boxes, and pop-up windows. Still, it’s where forecasts and market predictions get translated into workers’ marching orders. PP/DS features “heuristics”—built-in algorithms that distribute labor so that plants operate at their highest capacity. Running a heuristic entails clicking a button on the PP/DS interface that looks like a tiny magic wand. Click the wand, and a factory’s schedule auto-fills.

Despite such labor-saving shortcuts, using SAP is not easy. As the class proceeded, I felt as though I, too, were falling behind on an assembly line. Every task was more complicated than I’d imagined, with a seemingly endless variety of settings to configure; I struggled to keep the various interlocking systems arranged in my head. (It didn’t help that I sometimes clicked through SAP with one hand while participating in my daughter’s craft projects with the other.) Over time, though, I started to understand the dynamics of the system as a whole. Log in to PeopleSoft, or a similar human-resource management system, and you only have access to certain modules—the ones relevant to your particular job. The same is true in SAP. Most of the time, the work of supply-chain management is divided up, with handoffs where one specialist passes a package of data to another. No individual is liable to possess a detailed picture of the whole supply chain. Instead, each S.C.M. specialist knows only what her neighbors need.

In such a system, a sense of inevitability takes hold. Data dictates a set of conditions which must be met, but there is no explanation of how that data was derived; meanwhile, the software takes an active role, tweaking the plan to meet the conditions as efficiently as possible. SAP’s built-in optimizers work out how to meet production needs with the least “latency” and at the lowest possible costs. (The software even suggests how tightly a container should be packed, to save on shipping charges.) This entails that particular components become available at particular times. The consequences of this relentless optimization are well-documented. The corporations that commission products pass their computationally determined demands on to their subcontractors, who then put extraordinary pressure on their employees. Thus, China Labor Watch found that workers in Heyuan City, China, tasked with producing Disney’s Princess Sing & Sparkle Ariel Bath Doll—retail price today, $26.40—work twenty-six days a month, assembling between eighteen hundred and twenty-five hundred dolls per day, and earning one cent for each doll they complete.