Back in March when NBC’s “Superstore” was shutting down production on its fifth season due to the coronavirus pandemic, showrunners Jonathan Green and Gabe Miller automatically came up with a clever way to address the new health crisis and series star America Ferrera’s exit from the show.

“I remember thinking, ‘Oh it would be really cool to do a cold open jumping us through time of the pandemic and see what Cloud 9 was like in the pandemic, catching up to when we’re airing and we’re out of the woods,'” Miller tells Variety. “We were so naive.”

Seven months later, the pandemic is still ravaging the country, but “Superstore” is up and running on its sixth season — just with a slightly adjusted plan. That cold open idea was translated into a full episode, entitled “Essential,” while Ferrera’s exit does not happen until the second episode back, which is also the show’s 100th episode overall.

“Initially we were trying to do it all in one episode and we thought about just how to keep those two trains running at the same time and ultimately we just decided there was too much rich material in both and we wanted to do justice to both, and the best way to do it was to split them into two episodes,” says Miller.

“Essential” sees Amy’s big move to California to begin working for corporate parent company Zephra put on hold due to the pandemic. She stays in her managerial job in Cloud 9, where workers have to contend with everything from trying to figure out how to keep a safe social distance while still doing their jobs, to dealing with customers who are hoarding canned food and toilet papers, to concerns that there won’t be enough supplies for them to purchase when their shifts are over.

As a series, “Superstore” has always had a thorough research process for the specific needs of a particular storyline. For Mateo’s (Nico Santos) undocumented status, including him getting picked up by ICE in the Season 4 finale, the writers’ room consulted with Define American, for example. To capture the nuances of working in the big-box environment, Green says they have talked to many people who work in “different capacities” in those stores through the years. But because there was so much reported news about how the stores were dealing with the pandemic, he notes that the research for “Essential” came easily.

Green and Miller kept a Google Doc filled with events, news items and policy chances — in chronological order, Miller shares. They constantly updated it with everything from “mask policy or disinfecting the premises” to “hazard pay and how corporate was reacting or what workers were wanting.” And then it was also a matter of first-hand reporting from every time they shopped in such a location personally.

As they were writing and even shooting the premiere episode, they weren’t 100% sure of where the country would be in terms of the pandemic when the show was airing.

“Our goal was to never make light of COVID and just to find those funny, interpersonal or character moments, especially things that retail workers have to deal with and how much their lives have changed. It was definitely a line to walk,” says Green. But, “we knew we could get a lot of comedy out of the relatable side effects of living through a pandemic — just the weirdness of what life is like now.”

It was also a chance to offer the rest of the “Superstore” characters a glimpse into how Mateo has been living for quite some time now — specifically since that Season 4 finale when ICE got ahold of him.

“Everyone else is feeling like their lives are on hold during this COVID time and for Mateo, that’s how he’s been living for a while. So it’s sort of like everyone is getting a taste of what he experiences day to day,” says Green.

The sixth season will continue to capture how these characters are adjusting to changing health and safety guidelines due to COVID-19, as well as how they will have to adapt to having Glenn (Mark McKinney) back as their boss once Amy does leave. The show’s writing and producing team also may have to adjust a bit, depending on how the 2020 presidential election turns out. They acknowledge that even with a new president in office, “the lives of people in stores aren’t going to change on a dime,” but what if Joe Biden wins and puts the country under a true lockdown for a few weeks to get the pandemic under control? Would they consider doing a fast-turnaround episode showing the characters at home, unable to work because their store is closed?

“If those kinds of things happen, I think we would consider, ‘OK when are we airing?’ because the way that would change people’s lives would be interesting. We want it all to feel as real as possible,” says Green.

“Superstore” Season 6 premieres Oct. 29 at 8 p.m. on NBC.