KRACOEUS-8191:added previous gg tracking id and agency routing id to spo...

...nsor info
too many nested ifs here. Can you try to refactor or move to a helper method please?