Here, we have used the search criteria’s summary function to meet the requirements.
The requirement is “send email to customer if “Appliance only” product is not scheduled for delivery with status A, B, C or O is committed to an sales order for 7 days. Or S status item committed to an sales order for 38 days.“
For this we have used the following search,
type: “salesorder”,
filters:
[
[“type”, “anyof”, “SalesOrd”],
“AND”,
[“custcol_dt_order”, “isempty”, “”],
“AND”,
[“mainline”, “is”, “F”],
“AND”,
[“cogs”, “is”, “F”],
“AND”,
“taxline”, “is”, “F”],
“AND”,
[“shipping”, “is”, “F”],
“AND”,
[“status”, “anyof”, “SalesOrd:B”, “SalesOrd:D”, “SalesOrd:F”, “SalesOrd:E”],
“AND”,
“item.custitem_jj_default_appliance”, “is”, “T”],
“AND”,
“formulanumeric: case when {quantity}={quantitycommitted} then 1 else 0 end”, “equalto”, “1”],
“AND”,
[“linesystemnotes.field”, “anyof”, “TRANLINE.RCOMMITTED”],
“AND”,
[“custbody17”, “isnotempty”, “”],
‘AND’,
[[[[“max(item.custitem_aha_item_status)”, “is”, “A”], “OR”,
[“max(item.custitem_aha_item_status)”, “is”, “B”], “OR”,
[“max(item.custitem_aha_item_status)”, “is”, “C”], “OR”,
[“max(item.custitem_aha_item_status)”, “is”, “O”]], “AND”,
[[“max(linesystemnotes.date)”, “on”, “daysago13”]]], “OR”,
[[“max(item.custitem_aha_item_status)”, “is”, “S”], “AND”,
[“max(linesystemnotes.date)”, “onorbefore”, “daysago43”]]]
],
columns:[‘required colums’]
});