At the office, Pam gives Jim a welcome-back card to sign for Stanley. "Glad they didn't mix up your tonsillectomy with a mustachectomy." Jim objects to the card's reference that Stanley has a moustache. Pam argues Stanley does have a 'stache and soon the entire staff is debating the "does he or doesn't he" question to no resolution. Finally, Stanley walks into the office and the answer is... moustache! Jim shrugs his shoulders with a typical "who knew" look.
Nellie, the self-appointed new manager of Scranton, comes in late to the office. Before the employees can even react to her lazy work ethic and condescending tone, Nellie goes on a horrible un-P.C. rant about the Irish, Hispanics and African Americans. Robert breaks the tension by suggesting Nellie just needs some help adjusting to her new surroundings. Robert orders Jim and Dwight to help Nellie unpack at her house; he instructs everyone else to throw a welcome party for Nellie at the end of the day.
The reconciled Erin and Andy are happily driving back from Florida to Pennsylvania. The only hitch in their reunion is Andy's soon to be ex-girlfriend Jessica. Andy plans to stop at Jessica's family cabin and quickly and gracefully end their relationship, so he will be able to be with Erin at last. As incentive, Erin won't let Andy kiss her until he tells Jessica they're through.
The party-planning committee of Angela, Oscar, Phyllis and Pam bemoan throwing a party for Nellie. Suddenly, Phyllis has a brainstorm: throw Nellie an awful party. Angela contends all their parties are bad, yet Pam says this time it'll be on purpose. Inspired, the team envisions the best of the worst: carrot cake, black streamers and the improvisational music stylings of Creed. Jim loves the idea and adds they should get a magician after hearing Nellie call them repulsive while helping her move.
Erin and Andy are surprised to find a bunch of cars parked in front of Jessica's family cabin. Only Jessica and her parents were supposed to be there. Inside they discover that Jessica is hosting a bachelorette party for one of her best friends. So much for an intimate heart-to-heart talk.
While moving boxes, Dwight and Jim stumble upon photos of Nellie and her ex-boyfriend. Nellie catches them and turns suddenly personable, opening up about how happy she was with her old boyfriend until he left her for a waitress at their favorite restaurant. Dwight offers to help Nellie forget the whole affair by hitting Nellie in the brainstem with a candlestick. She politely declines. As Nellie mentions her former beau was a stage magician, Jim realizes he's done a terrible thing for her party.
Andy and Erin are feeling more and more uncomfortable at the bachelorette party. Erin's frustrated Andy won't get the breakup over with and Andy keeps getting overwhelmed by the situation. It doesn't help when Jessica's sister tells Andy he's one of the few good guys out there in the world.
After Jim hears Nellie's sad story, he tells Pam to call off the "bad" party. Pam tries to change the party to a "normal" bad party but the social committee of Oscar, Angela and Phyllis say it's too late. "We're not stopping this train, so get off the tracks!" they tell her.
Andy finally corners Jessica; instantly, she can tell he's breaking up with her. The rest of the bridal party gathers around. Jessica reminds Andy he told her Erin wasn't relationship material. Andy looks for the path of least confrontation and says he's not leaving Jessica for Erin... he's leaving because he's gay. The excuse seals the break-up deal, and Andy and Erin speed off. However, it's clear that Erin isn't impressed that Andy told a lie instead of the truth.
During the welcome party, Jim tries to use the code words to explain maybe some bad things have happened to Nellie to make her act like she does, yet the revelers have none of it. The magician shows up, much to Nellie's horror.
Andy and Erin drive away from the cabin. Andy is relieved that ordeal is all over and is excited that he and Erin can finally kiss now. Erin only offers a peck as a kiss - not what Andy has been anticipating at all. Erin fakes falling asleep so she doesn't have to talk anymore about it to Andy.
Sensing Nellie's apprehension of the magician, Jim and Pam go out of their way to sabotage his tricks and ruin his act so he won't be upsetting to Nellie. Nellie appreciates their efforts as the magician storms out, offended by this treatment. Robert doesn't understand and tries to chastise Jim and Pam for ruining a great party. Kevin counters, "You call this a great party?! There are vegetables in this cake!"
Andy drives back to the cabin and marches in to tell Jessica the truth. He's not gay; he's in love with a girl. It's Erin; she's funny and beautiful and total relationship material. Erin beams at Andy, proud of him for standing up for himself and for her. Furious at Andy for upsetting Jessica again, the bachelorette partiers chase the lovebirds out of the cabin. Andy and Erin duck into the safety of his Prius to avoid thrown slices of cake. Erin's so impressed with Andy's display, she finally gives him a real kiss.