Plasma cells and memory cells
A summary of what we know so far includes that for B cells to become plasma cells they need BLIMP-1. For memory cells CD40 engaging with CD40L on B cells is required. CD40 is expressed on Th cells and thus they are also necessary for memory cell development. Problem is though, it's really damn confusing after that. It really isn't known but if you're interested in this stuff consider reading this review which talks about memory cell differentiation and this which discusses plasma cell differentiation. 

The image below helps (taken from this review)

PC = Plasma Cell, MBC = Memory B cell