This is really simple. First of all you need to pick a type and validate with case condition and then join case results together.
LTRIM(
CASE WHEN {shiptype} IS NOT NULL THEN '|SHIP='||{shiptype} ELSE '' END ||
CASE WHEN {packagetype} IS NOT NULL THEN '|PACKAGEID='||{packagetype} ELSE '' END ||
CASE WHEN {othertype} IS NOT NULL THEN '|OTHER='||{othertype} ELSE '' END
, '|')
Lastly, LTRIM(Data, '|')
removes the leading |
. Cheers.