Scripting help - Contracting

SOLVED

Forgive me if this is against the rules, but I'm trying to find resources to help create a script in SO_SalesOrder Entry. I used to reach out to a particular individual but they are not responding so I'm looking for other folks that could help.

In short, we run a semi-complicated pricing rule system on our e-comm site that does not work (at least we've never seen how to make it work) in sage. We have our customer's assigned a price level, but the price assigned will be determined by the base price of the item & the unit of measure they are purchasing. It's is not a standard volume level discount like I've seen in Sage.

Is anyone familiar with someone who could help with creating a script to achieve this?

Parents Reply Children
  • 0 in reply to BigLouie

    Yes, for example:

    If product.udf_stockbaseprice = 'Y' then stockbaseprice*uomconversionqty
    else if account.pricelevel = '1' and unitofmeasure = EACH then stockbaseprice
    else if account.pricelevel = '1' and unitofmeasure = INNE then stockbaseprice*(1-.01)*uomconversionqty
    else if account.pricelevel = 1'' and unitofmeasure = CASE then stockbaseprice*(1-.03)*uomconversionqty

    I mean, I think I have 80% of the script logic done, it's a matter of the objects, getval, retval stuff for Sage I don't understand.

  • 0 in reply to RedemptionMatt

    I think a Case statement would work better. Wonder what Kevin thinks about using Case instead of Else If

  • +1 in reply to BigLouie
    verified answer

    I prefer to manage this type of thing by UDT data instead of hard coded rates within a script (so changes can be made by users with access to the UDT).

    Set up a UDT with an appropriate key field like ItemCode^PriceLevel^UoM (with the multiplier as a column in the UDT), then do a line pre-write script to look for a value in the UDT.  When you find a row in the UDT (for the SO line's item / price level / UoM) then get the multiplier and apply it.

    (I'm guessing a Case statement might run faster than a significant number of nested If's).

  • 0 in reply to Kevin M

    a UDT would be great, but I've never set those up in Sage & I will still be spinning my wheels with a script.

    If we setup a UDT, I could sync the values via SQL if they were to ever update (we set them in Salesforce)