When planning a pilgrimage, the participant is expected to announce their intention to do so at the start of the journey.
Muhammad decreed that Umrah and Hajj can be combined, i.e.: starting a pilgrimage with the intention of participating in both events.