View Single Post
  #5 (permalink)  
Old July 4th, 2007, 12:51
runinord runinord is offline
Junior Member
 
Join Date: Dec 2006
Location: Orlando, Florida, US
Posts: 29
Thanks: 0
Thanked 1 Time in 1 Post
Groans: 0
Groaned at 0 Times in 0 Posts
Rep Power: 0
runinord is on a distinguished road
Send a message via MSN to runinord Send a message via Skype™ to runinord
Re: Build Sell Charges from Buy Side Costs

Hi Kee,
You can set this up in an agent and a rate record or rate offer. The reasson why I am using a mile stone monitor is that our buy shipments sometimes get added lumber fees and other accessorial charges after the trip has completed. So we set the milestone monitor up to execute 4 days after delivery anticipating all cost to the buy shipment should have been added by then. Then I have created a saved query and condition for the domains that are to be handled like this and I use this condition in the mile monitor to execute the actions if the orders of the shipment belong to the domains specified in the saved query that the saved condition is refering to.
Saved condition: Name= Admin_Fee_For_Domain_XXXXX,Type = SHIPMENT
SQL=SELECT ORR.DOMAIN_NAME FROM ORDER_RELEASE ORR, VIEW_SHIPMENT_ORDER_RELEASE VSOR WHERE ORR.DOMAIN_NAME IN('the_name_of_the_domain_to_be_charged_an_admin_ fee') AND ORR.ORDER_RELEASE_GID = VSOR.ORDER_RELEASE_GID AND VSOR.SHIPMENT_GID = ? AND PERSPECTIVE = 'B'
Saved Condition: Name = Admin_Fee_For_Domain_XXXXX, Saved_query=Admin_Fee_For_Domain_XXXXX.
In my case all sell shipments in these domains are to be built with the the total cost of the buy shipment and added an admin fee, this admin fee should be created under "Contract and Rate Managment-->power data--> Rates And Codes-->Accessorial Codes" in the public domain and remember to tick the Always apply box. Loged in as admin in the domain that is to be charged this admin fee in the same power data section add a new accessorial cost too and insert the admin fee you want to charge in the "charge Amount" field and select per basis to be shipment and in the Charge Group field enter a new group, e.g. admin_fee_domain_name.
Then while loged in as admin in the domain where this admin fee is to be charged go to "Contract and Rate Managment-->Rate Offer" and edit the rate offer to be used and under the tab Accessorials enter the newly created Accessorial Code ID and the the newly added Accessorial Cost ID and click on save and Finish. This setup the rate structure.
To create the business logic create an agent or a millestone monitor, assuming you are going to do this via an agent I will explain the setup for the agent:
Create a new agent that builds the sell shipment when the buy shipment changes status to Secure Resource accepted. Create an agent
Agent ID=add admin_fee_to_domain_xxxx
Agent Type= SHIPMENT
ACTIVE=TRUE
Agent Events
Event=SHIPMENT - STATUS CHANGED
Restrictions=INTEGRATION or INTERNAL or USER,SECURE RESOURCES_ACCEPTED
Saved Condition= Admin_Fee_For_Domain_XXXXX
Run As=USER ROLE
Actions
Action: ALLOCATE SHIPMENT
Action: BULK PLAN SELL-SIDE SHIPMENT: With Order Mode
Error handler:
NOTIFY CONTACT: you username, Agent Failed to build Sell
Send me an email on rvilhelm@mbxlogistics.com and I will be happy to send you screen shots of the setup and explain it in more detail.
Hope this helped.
Runi
The Following User Says Thank You to runinord For This Useful Post:
bfolan (November 23rd, 2007)