I was sent to work abroad by my US employer. After a few years, I was 'localized', i.e. worked for the local entity and no longer received a W-2 or had SS wages paid for or withheld by my employer. I am not sure if the local organization is considered a foreign entity for tax purposes or a foreign affiliate of a US company.
Not knowing exactly what you are looking for , and assuming that (a) you are a US citizen/resident and (b) you are interested in the effect on you as to the characteristic of your employing entity, I venture to say the following:
(1) whether you are emplyed by a foreign entity or an affiliate of your US employer ( implying the entity while organized under the laws of the foreign juridiction and paying taxes there, is either partially or wholly owned by the US entity), the sources of your income is foreign,
(2) The work is being done abroad/ offshore
(3) therefore as long as you qualify otherwise for a foreign tax home, your earnings are eligible for foreign eanred income exlcusion.
Does this answer your concerns or were you looking for something else?