A ‘Close’ button, a ‘Back’ button and user journey branches

We have an interface where users can search for a customer. The customer details page has a 'close' button which at the moment means the user will go back to the Customer Search page. In other words:

Customer Search --> Customer Details --> 'Close' --> Customer Search

However, some customers are related to others in some way (e.g. parent and child).

Customer Search --> Customer Details --> Related Customer Details

Therefore when the user goes into customer details and then the child customer details, they get the same normal customer interface layout and breadcrumb. So in this case the link would be

Customer Search / Customer A Details

Customer Search / Customer B Details (.... who is the child, or related in some other way)

However, the 'close' button on the customer details page is causing confusion because it could mean:

a) Go 'up' to the customer search page

b) Go 'back' to the parent

We could track the customer journey and then change the breadcrumb as appropriate, eg

Customer Search / Customer A Details / Children Details / Customer B Details

which would then hopefully make it clear what the 'close' button does. Or implement a back button (that just calls the last page in the browser history)? Both?

The problem I forsee with tracking the user journey is that it appears to replcate the browser back button and potentially could get very very long and complicated to track, especially if the user branches off into sub information about a related customer. Or editing details. When would you stop?

Any best practice, further reading or even a searchable phrase / description for this problem would be a great help.