It's completely optional from what I know, if you want, you can. I don't think it really changes much
Viewing post in Undertale: Act to Flirt comments
It is quite simple, after you do the Asriel boss fight you must choose someone (for their ending) and keep in mind this can only be achieved if you have a pacifist route or at least befriend Toriel. Okay so after the fight you must choose Toriel and you will get her ending, though I will not spoil it.