When I use `ShiftContext()` to get a list of affiliated customers, each affiliated customer has its own `context_customer_no` and `original_customer_no` fields. They seem to be the same for every affiliated customer.
Conceptually, the original customer appears to be the household of the individual who logged in. If the logged-in individual has no affiliated household, then it's just the individual. The context customer is the constituent currently in-context for the session, which is only different from the original customer if `ShiftContext()` was used.
If that is correct, then why does `ShiftContext()` return these two fields per affiliated customer?
Hey Brian!
You've outlined the use of those two fields perfectly. Original customer is the one who's logged in while context customer is the one who's presently holding the session associated to their record. These values really only come into play when dealing with a household where a user could login and have their context shifted (for example, loging in under their individual account and having the API shift their session context to the household account). If any activity on a web application required that their session be shifted back to their individual constituent, once the shift has taken place, the context customer would reflect that the session is currently associated with their individual record and not the household.
Hope this answers your question, but if not, let us know!
H
Thank you, Heather. Any thought on why original customer and context customer values are returned for each affiliated customer? Would they ever differ between affiliated customers returned by a single call to `ShiftContext()`?