SPOILER ALERT: Do not read if you have not yet seen “California Part 2,” the second episode of the sixth season of “Superstore.”

Saying goodbye to any beloved character on a television series comes with a lot of tears, even if that series is a sitcom. In the case of NBC’s “Superstore,” the sadness wasn’t just because Amy (America Ferrera) was leaving her makeshift Cloud 9 family to take a corporate gig out in California, but also because she and Jonah (Ben Feldman) broke up before she left.

Feldman was not also leaving the show, so realistically Jonah could never go to California with Amy, despite that being their initial plan. But the reasons showrunners Jonathan Green and Gabe Miller decided Amy and Jonah should break up, rather than simply attempting long-distance, were two-fold.

“We didn’t want to be a show that has Jonah entering a scene and saying, ‘Hey I just got off the phone with Amy!’ — that Amy is still present in the world but we never get to see her. That’s very frustrating for fans,” Miller tells Variety. “Amy and Jonah are different people — that’s part of what we played for the last five seasons — and they might not be on the same page about what their future is together.”

“California Part 2” is the second episode of “Superstore’s” sixth season, the 100th episode overall and the concluding chapter of Amy’s “move to California” saga that began in Season 5 but was halted due to the coronavirus pandemic shutting down production back in March. In the episode, Amy is finally packing up her things to leave behind her big-box managerial job to go out and work for parent company Zephra. When she realizes a ring of hers is missing, she assumes Jonah took it to get her ring size because he is planning to propose. This sends her spinning a bit, as she realizes she doesn’t want to marry him, even though he was planning to follow her to the West Coast. It turns out he did take the ring, and he returns it, choosing to stay at Cloud 9 and send her off, single.

But, perhaps because they talked things through before he uprooted his life, Amy and Jonah part on good terms.

“We tried to leave the door open; who knows if they’ll ultimately end up together?” Miller says. But it just felt like the most interesting and real way to tell that story when Amy was leaving.”

Ferrera announced that she would be exiting the long-running sitcom in February, just two weeks after the show received its sixth season renewal. At the time, the plan was for her last episode to be the fifth season finale, but when the pandemic hit, that season was cut one episode short. Initially, Ferrera agreed to return to guest star in one episode of Season 6 to be able to finish the “California” two-parter that began in the spring, but as COVID did not cease, the showrunners saw an opportunity to work that into the sixth season opener, including using it as a reason Amy’s move was delayed.

“We called [America] and we said, ‘We know we got you to come back for one more, is there any chance we could get you for two?'” says Green. “I think it helped that our second episode was going to be the show’s 100th episode. It let her be a part of that and it made the 100th a big episode because it’s her farewell.”

Often such milestone episodes are celebratory in nature, and “Superstore” was no exception — even if the celebration was bittersweet. Amy’s co-workers put together a goodbye video for her, which allowed them to tell her how they felt about her, and then they threw her a going-away party in the parking lot after a customer bought them a case of beer as a thank-you for all they were doing in the time of the pandemic.

“There were versions we talked about where the whole episode would have been one goodbye after another,” Green says. “Ultimately the goodbye video was a great way to get out a lot of that stuff without it having to be Amy going through her day with one person after another saying goodbye. I think part of finding that balance was, as comedy writers, at times pulling back on our natural impulse that when something is genuine or sincere you want to undercut it with comedy. There were really nice moments and we thought we should put in a joke after it, but at times, for this one, we need to let the moment breathe.”

Going forward, the “Superstore” audience won’t see how Amy is faring out in her new job, but instead the show will focus entirely on how everyone else at Cloud 9 is handling her absence. The most accurate way to describe it, Green says, is as “an adjustment for everyone.”

And for some, it will be an easier or better adjustment than others. Glenn (Mark McKinney) is back in the boss’ office, but he’s going to try “to manage the store a little differently this time and not stress himself out as much, and that will eventually end up leading to a whole new structuring of the management of the store,” Green shares.

Cheyenne (Nichole Bloom) will be “stepping up and getting a little more responsibility” in Amy’s absence, Green adds. Dina (Lauren Ash) “can’t believe that Glenn is back serving as manager” but also is deeply focused on “looking for a new friend to connect with to replace Amy, and leaning on some of her old relationships,” as she started to in “California Part 2.” Mateo (Nico Santos), Green continues, will be testing out “what he might be able to get away with having Glenn as his immediate boss and seeing the power that he might be able to yield as Glenn’s assistant,” but that will get complicated since he is working under another name because of how Amy helped him stay on at the store, despite his undocumented status.

“When you’re facing deportation, that’s always going to be at least in the background. You might not see him dealing with it in every episode, but he is regularly having to meet or Zoom with his deportation officer and is awaiting this hearing that may have been delayed by the pandemic,” Green explains.

And as for Jonah, it will be all about “figuring out what the rest of his life will be,” says Miller.

But fans shouldn’t worry that Kelly (Kelly Stables) will return and he’ll jump back into a relationship with her or that Garrett (Colton Dunn) will successfully set him up with someone new. “It will be a little while before he’s ready to date again,” Miller points out.

Adds Green: “We felt like to honor what a long-term, serious relationship they had that he wouldn’t jump back in [to dating]. So we won’t be rushing into that in the very early part of the season.”

“Superstore” airs Thursdays at 8 p.m. on NBC.