For a Transaction Saved Search filtered to Item Fu...
# general
j
For a Transaction Saved Search filtered to Item Fulfillments, I am trying to create an alert for when the Item Fulfillment status changes to 'Shipped', however, it does not send any emails out.
m
Do you have the when created/updated box checked?
j
Yes
message has been deleted
message has been deleted
I even tried Document Status
The field is being updated through the context SOAP Web Services, would that affect this?
m
There should be a send on update checkbox
Maybe on the recipients tab
j
message has been deleted
m
Also the web services could be interfering with the email script of the ss
You could do a workflow for sure
j
That is what I was thinking, I just did not see anything about SOAP interfering with that, but I guess that must be it
t
I'm curious, did it work on workflow?
j
Unfortunately I cannot get it to fire the email, I have it as a 2nd state and the transition happens on AfterSubmit, does not work. I tried transition on Entry too, same issue
m
Do you mind sharing screenshots of your workflow?
j
message has been deleted
The state gets stuck on 00: Initialization
The saved search includes all fulfillments within previousoneweek, so there is no reason it should not trigger a transition
m
This will send one email per fulfillment. Is that what you want?
j
Yes
I will modify it to only send on specific criteria but the baseline test of if it works in general does not work
I even tried transitioning on being marked shipped with the email send criteria being the saved search but it did not send emails
m
I’m confused on the use case. When do you want the email to send? Daily? In “real time”? Weekly?
j
Real time
m
And the criteria is that it shipped last week?
j
The current criteria is shipped within the previous week, I set that so not all fulfillments show up
So from right now backwards one week
m
Oh I see
So when the record is created you want it to send an email
j
When the record is marked shipped I want it to send an email
m
Right sorry
j
All good
m
What is your transition from state 1 to state 2
j
I tried AfterSubmit with the saved search criteria and Entry with saved search criteria, both are not triggering
m
I would make that transition after record submit and your criteria is a condition of status = item fulfillment : shipped
Then make sure to include web services in the context
That is not included by default
j
That worked for the transition part, but the email send action did not trigger
m
Do you have logging enabled?
j
Yes
m
Make sure the context of your send email action also includes web services
j
It does
m
And the logging doesn’t give you an error?
j
Apparently they aren't in the saved search even though they are
message has been deleted
m
But the saved search controls the transition not the action and I thought you said the transition works
Oh the transition doesn’t work
j
The saved search controlled the transition, I just switched it back to the status being the transition on afterSubmit, now the transition works again
m
Oh ok so we got the transition to work now that’s good
j
I need to wait for another instance with the new logic for the email firing issue
m
So now in the logging of the shipped state does it show the email action?
Ok
j
Will have to revisit this tomorrow, thank you for the help so far
m
Yep check to logging tomorrow on the shipped state and see if an error appears or if it shows as ignored/rejected
Talk to you tomorrow. Lol
j
message has been deleted
m
And all that is happening before your send email action?
So essentially all those errors are "blocking" your email from working?
j
Actually that was a different workflow I was looking at that had a similar name haha, turns out it's not transitioning still, not sure how it worked once then stopped
message has been deleted
m
It looks like your IF is being created using a UserEvent script. (Most likely you have the NS WMS or some WMS creating IF's as you pick orders) Then because your IF is created in some sort of Picked/Packed status the condition is false so that makes sense
Then later web services comes and changes it to Shipped?
j
Yes
m
And it looks like Web services isn't triggering an After Submit event
Is your Transition on After Submit?
j
Looks like it, and yes.
How can there not be an aftersubmit?
"RUN SERVER SUITESCRIPT AND TRIGGER WORKFLOWS" preference is set, so it is not that either
m
That's so weird
I'll be honest I'm a little stumped
I have a few ideas but they are kind of "reaching" 1. Try to do a simple action like set field value on a custom checkbox using After Submit in your first state. If that works then try to do the Send Email After submit in the first state (like without a transition) Maybe the transistion is messing things up?? 2. Also something that i'm pretty sure would work is to make a custom checkbox on the IF called "Email Sent". Then make a separate Saved Search of all IF's in Shipped Status with Email Sent = F (and whatever other criteria you want). Then make a Scheduled WF based on that saved search that runs every 30 min. On Entry in that WF do first a Send Email action then right after that check the Email Sent checkbox. So at worst your email will be sent on a 30 min delay from when something is marked shipped.
j
I considered #2 previously but the end goal of this workflow is to alert certain users of shipments that cost a multiple over what the customer paid in shipping so we can resolve the issue right then and there. Delaying up to 30 minutes can be risky as sometimes they are literally putting the package on the truck as they are here waiting and it might be too late
Strange, I break the other workflow that was throwing errors and this one suddenly starts working
Is it possible to make a workflow priority so it runs before the other one?
m
Not that I know of. Can you combine them somehow?
j
Potentially, let me try that
Oh, wait I can use 'Wait for Workflow' on the error throwing workflow to wait for the shipping cost notifying one
Not sure how that will work with a workflow that never exits though
Eh I just combined them and it works
m
nice
j
I guess if another workflow throws an error all other workflows cease to run?
m
I'm not sure, there was definitely something conflicting enough for NetSuite to just "give up" LOL
I usually try to just do 1 main workflow per record type, then any additional actions that don't fit within the "main" workflow I do as 1 off scheduled workflows so they don't conflict with each other
It doesn't always work as sometime that "main" workflow gets pretty huge
j
Smart. That was what I learned at SuiteWorld last year in the advanced workflows class. I just have not had the chance to convert the tons of workflows into one big one haha
I guess now is a good start with these 2