Hi All, Im trying to create a workfow that will ru...
# suiteflow
k
Hi All, Im trying to create a workfow that will run a suitescript which sends a webhook to a website to update the sales order. With Tracking and Status Shipped. The problem is now trying to fire the suitescript with a workflow. What I have so far is, 1. CustomSuteScript : Type 'Workflow Action', 2. Deployment of this CustomSuteScript with Applies to = SalesOrder, 3. Workflow: type Transaction, subtype = SalesOrder, Execute as admin, Status = testing, OnCreate and On View or Update checked, Trigger = After Record Submit, EventType = All, Contexts = All, Condition = This is where I am not getting anything and not sure what to put?
Tried Condition = "Old Record : Document Status = Pending Fulfillment"
I would like it to fire when the order changes from "Document Status form "Pending Fulfillment" to "Billed" (basically once all items are shipped)
n
the issue (I believe) is that the Sales Order is not edited at the time of Billing and therefore doesn't trigger your WF. Some options to consider there are probably more: a) Can you trigger it on the Invoice create which is the billing. your script would then update createdfrom.id instead. b) Run as a scheduled workflow which would have criteria to find the newly Billed SO. c) Does your WF have any other function or Stages? Just change your script to run directly from Invoice After Submit
k
Thank-you for the info. Just to clarify, in the SalesOrder on the 'system info' tab it is showing a record of a UI - Change of 'Document Status' from 'Pending Fulfillment' to 'Billed'. You think this will not be enough to trigger the workflow? well probably answer my own question as it is not firing so it cannot see the condition. a. Invoice create may not be at the time of shipment status change - so i will rather try a workflow on Item Fulfilment shipstatus b. this is an option maybe last resort c. No other functions other than run a script In saying that I have setup another workflow on the ItemFulfillment ::: Events: On Create, On View Or Update Trigger Type : After Record Submit Condition: Shipping Status = Shipped And Old Record : Shipping Status != Shipped And this too is not firing when I mark the IF as shipped!
n
I would start by getting my workflow to trigger on any IF first for your own confidence. Then start to tighten down to your specific criteria. Usually I leave the Workflow Trigger Type as All and apply the After Submit at the stage level
k
OK, thanks - pulling my hair out with this. 🙂