Warning: This article contains spoilers from Thursday’sSuperstoreseason 5 finale, “California (Part 1).”

In February,NBC announcedthatAmerica Ferrerawould be leavingSuperstoreat the end of the comedy’s fifth season.

Specifically, they filmed 21 of 22 episodes.

SUPERSTORE

Credit: Casey Durkin/NBC

ENTERTAINMENT WEEKLY: At what point did you all know you’d be saying goodbye to Amy this season?

JONATHAN GREEN:We knew it was a possibility about halfway through the season.

What were the discussions in the room about how you wanted her to leave?

GREEN:We really wanted to feel good for her at the end.

You’re saying goodbye to such a major part of the show.

She really wanted to come back and do the planned finale as our first episode of next season.

It was a very quick, mutual decision.

There was no back-and-forth about it at all.

We were like, “This obviously has to happen.”

Where did the idea for the amazing Sandra adoption story line come from?

The comedy of the situation is she wasn’t expecting to become a mother today.

Amy and Jonah’s relationship has been so central to the show.

What can you say about how her move will impact them?