It can be done either way but we feel adding the jam before baking creates the best result in taste and texture of the cookie.