This content has been marked as final. Show 1 reply
793318 wrote:I'm not sure about the api's but here is how you can get through it..
We are trying to find territory/sales person information for an Order. When we entered the order then we do not enter sales person name, so now we are trying to find territory/sales person information
Based on Territory setup, like sales order customer name or zip code etc…is there any public api which can be used to find this information. We are doing kind of reverse engineering…like find the sales rep information for an order …
Since you've the order information, you know who the customer is. Get the party information of the customer from hz_parties.
Now, it is going to be little tricky to find out the right sales rep based on how the territories and how the upstream processes is handled - let us go one by one -
I'm assuming this is some kind of conversion activity and you are trying to find out who the sales rep was?
Alright, If this order was generated from a quote you always have a reference. If it does not have a quote, does it tie back to an opportunity/lead? if yes, use the party information identified in the earlier step - identify how many opportunities are there? if it is more than, see if the right product is captured on the opportunity...if No, then it is tricky and you have to by creation date or atleast by last_updated_date. And, the owner on the opportunity or lead would be your sales rep.
Now, if you dont have an opportunity/lead....how am I going to find out.......
Again, you hve the party information, check who is on the sales team. if there is more than one sales rep, you have to see where these sales reps fall into and in which territory........
In simple words - if you have more than one sales rep who can work on a given lead or opportunity and if you dont have any other custom attributes identified at the territory level, it would be tough to identify the right sales rep....
hey, by the way - if you have commissions and if you have paid the commissions, you can find out the right sales rep......that is down stream!!!!