BPM for Sales order Cretion from quote to validate site

We recently enabled multi-site for my company. I need a BPM that will warn the end user if the customer ship-to is for certain states (i.e. LA, MS, AL) and they are not logged in the site that handles the sales order, that it throws a warning before creating the sales order either from a quote or creating a sales order directly.

I have a feeling that I am going to need custom code.

Hi Charles,

This shouldn’t be too difficult. One thing I’d recommend is setting up a Sales Territory for each site (SalesTer table) with the correct states set up in the Sales Territory Boundaries (SalesTBD).

If those are set up, it should be fairly easy to check if the ShipTo.Territory for the ShipTo on the Quote or Sales Order is valid for the current site, and throw a warning or error.

Something like this:

Where you link the Quote ShipToNum to the ShipTo Table, and set a criteria for the territory that matches the current site. If no rows are returned, then it’s outside the proper boundaries, and you can throw a warning.

If you already use territories and can’t alter the territories attached to the ShipTo, you’ll probably need to do just a bit extra to map the proper site to the existing territories, or directly to the ShipTo.State

Forgot to add: To set a variable to the current site, just use the Set Argument/Variable widget with the expression callContextClient.CurrentPlant

Should this be set to post or pre-processing?

Should this be set to post or pre- processing?

I would do pre-processing.

Thanks for the help. The BPM worked.