BPM Logic - ShipToCustID AND ShipToNum not properly defined?

So, we want to set a handling charge when the ship to customer has a pay account. That works (using the condition in line one).

A new request was added, however, and I can’t get that to work. This request asks that a handling charge be applied to everyone with a pay account EXCEPT CustNum 1119 when using their ShipToNum 4 (this ship to for this customer has a pay account, but should not be charged a handling fee).

I thought I added this logic correctly (see lines 2 and 3 below), however a handling charge will never be applied to CustNum 1119… that is, all of their ship tos with pay accounts SHOULD get a handling charge except their ship to #4. With this current logic, none of their ship tos get a handling charge.

For all other customers it works. I can choose a ship to and if it has a pay account, a handling charge is applied. If no pay account, no handling charge.

I thought the Prefix and Postfix would allow me to exclude just this (CustNum+ShipToNum) combo, but it doesn’t work. What am I missing? The ShipToNum field is a nvarchar, so I’m using the “not equal to”… is that the issue? does this need to be used only on int?

The parenthesis don’t do anything in this scenario, you are basically saying that all 3 conditions must be true, so if the customer is 1119 it will always return false because of line 2.

Try splitting this into two condition blocks:

  1. Check PayAccount is not empty (connect the true node)
  2. If customer is 1119 and ShipTo is 4 (connect the false node)

Right now, if another customer also has a ShipTo 4, it will also not work for them.

Thank you. I was trying to avoid having nested conditionals and instead use the pre/post feature. Is there a way to do this in one conditional?

If not, I will go with the nesting.

Thanks.

I don’t really know if it is possible, but try this

  • Change line 2 and 3 to “equal to”
  • Line 2 Prefix put “!(” without double quotes

Basically saying “And Not” on line 2, so if conditions customer = 1119 and shipto = 4 are not met, the validation will go to the next block.