Hi everyone, I have an issue with an action not firing consistently causing missed customer quotes from going out for my client. The issue has been reported and confirmed by AppSheet but theyโve advised โWeโre going to add more logging, but without the ability to consistently reproduce the error, thereโs not a lot more we can do.โ
I really need to get a solution pulled together for this client as theyโre losing faith in the system. Is there any other way you can think of to set the value of a column after it has been saved in order to trigger a workflow?
Any help would be greatly appreciated! Thanks
You need to set a columns value in order to trigger a workflow? So you want the workflow to happen when a record is edited? Can you describe your goal a bit better, Iโm afraid thereโs not much to suggest without knowing more details?
Hi Marc, I have a quoting tool configured as below:
1.I have an action that will change the Quote Stage to In Process On save.
2.An UPDATES ONLY workflow is triggered when the Quote Stage is set to In Process. It sends an email with the quote content and then completes a number of other updates to the row after the email is sent.
When I initially set the workflow to run immediately after the quote was saved (ADDS ONLY) with no โIn Processโ condition, the system sent the email before the associated Quote Details (products data) was completely saved so users received a blank quote.
Daisy
I had a similar situation before.
But my approach was slightly different. I had a tracker table for all the statusesโฆ
My action would simply ADD a new row to that tracker tableโฆ
I never liked โupdateโ workflow triggersโฆ they are inconsistent.
But ADDING rows to tables always seems to trigger workflows consistently they seem to become congested and workflow either never execute or burst out 30min later out of nowhere.
EDIT: I realize youโll have to really re-do your PDF code to accommodate the fact that youโre doing it from another table โฆ but i guess itโs a small price to pay if the workflows trigger consistentlyโฆ
A million thanks Alex and I see what you mean. I do have an โActivityโ table in place to capture when the Quote Stage was made and added a few more stages to track for this issue but I want to make sure Iโve configured this like you mentioned above since my actions seem to be failing.
*The user inputs the Quote Header (parent) with Details (child), then presses Save
*I have an On Save action on the Quote Header that runs a grouped action.
*The grouped action, 1) creates the activity record to table โActivityโ, 2) updates the Quote Stage field in Quote Header to โIn Processโ and then 3) *creates another activity record for the new stage โIn processโ
I implemented this yesterday morning and have been monitoring client records as theyโre posted. The activity tracking would tell me which actions of the grouped action didnโt process - I thought it just didnโt like the stage change. Since thereโs no data in the activity tracking table at all for some of the quotes it appears the entire action never fired at all.
Is this how your scenario is set?
So hereโs how i would handle this:
3 Tables:
Quote MASTER (for the quote header info)
Quote DETAIL (for the quote line items data)
Quote STATUS (linked to the MASTER table with an ENUM field called STATUS โฆ which would include all the statuses you want to track that MASTER entry with)
Step 1) CREATE QUOTE > Workflow 1 >> Triggers on the addition of NEW ROW to (letโs call it) QUOTE MASTER table.
Note: At this point i would have a one VC with an if statement: IF(ISBLANK(Related Quote STATUSs),โNewโ,MAXROW(โQuote STATUSโ,โTimestampโ,([QUOTESTATUS_UID] = [_THISROW].[QUOTEMASTER_UID]))
That way I can create Slices โฆ do reporting etc etc on that Master QUOTEโฆ Based on a quoteโs status.
Needless to say - weโre going to be using the addition of the QUOTE Master itself as the triggerโฆ (If you want to fire out PDFs at this stage be careful thoughโฆ this might have a wierd effect if you make the QUOTEMASTER_UID ref column a โPart ofโ the Quote MASTER tableโฆ the sequence of events will change to A) New Master Entry B) Trigger C) Addition of DETAILSโฆ Your PDF will be missing the children. Thereโs ways to handle thisโฆ)
Step 2) Move Quote MASTER to โIn Progressโ > Create action that adds a new row (hereโs your trigger!!) to another table based on the data from this table.
Note: The action will simply add a new row to our STATUS table causing a Trigger and instantly changing the status of the Quote MASTER entry since we now have that VC in place.
**Step 3) ** Rinse and repeat for other statusesโฆ
Sorry for the ramble - hope the above makes some sense.
Hi Jon, hope all is well. I configured the scenario above and although the add row to Activity table action worked, it looks like my CREATE QUOTE workflow (email_quote_prospect) did not fire based on the audit trail. Could it be my VC formula? My guess is the system didnโt have time to calculate the vc formula and the Condition was therefore false?
*** Audit Trail**
*** Quote Master workflow for Add Only**
*** VC Formula =**
IF(ISBLANK(Related Activitys),
โPendingโ,
LOOKUP(MAXROW(โActivityโ,โDate Time Enteredโ,AND([Reference] = [_THISROW].[quote_id],[Type]=โQuoteโ)),โActivityโ,โactivity_idโ,โStatusโ))
Table Cross References:
Quote MASTER = Quote Header
Quote DETAIL = Quote Detail
Quote STATUS = Activity
I think weโre onto something here. Thanks Jon
Hey @Daisy_Ramirez
The basic idea is that Workflows need to be triggered based on the mere fact that thereโs a new row in XYZ Table - not based on a change in a VC.
So, in essence we end up with having two slightly different workflowsโฆ The template should in theory stay the sameโฆ since youโre basing your whole report on [quote_id] key column.
Workflow 1 - โOnly New Quotesโ - we use the [quote_id] from the new entry in the Quote MASTER (Quote Header) table โ Should trigger on ADDS_ONLY
Workflow 2 - โQuote Updatesโ - we use the [quote_id] from the new entry in the Quote STATUS (Activity) table. โ Should trigger on ADDS_ONLY
Hope this makes sense and iโm not missing any beats anywhere
Thanks Jon, I was able to get the Workflow 1 email (in your note above) to fire successfully and have implemented it with the client. Two out of 9 new records did not generate a quote as expected.
Workflow1 for new quotes only, triggers on ADDS_ONLY and fires when thereโs a new record in the Activity (STATUS) table.
Workflow2 for updates only, triggers on UPDATES_ONLY and fires when the โSend Quoteโ field is set to yes.
I was hoping actions that create new records to another table were more reliable than the field update actions I originally started with. It appears the create_activity record action at On Save of the form, didnโt fire so a record was never posted to the Activity table to fire workflow 1.
Hi Alex, Iโve been working through your scenario here and have a question about the actual email template.
Based on your example above,
Iโm having trouble with my email template:
Hereโs the Start Expression of the email template:
Hereโs the error Iโm getting:
Thoughts?
If the action only sets the column value on a form save, you could instead try to set an Initial Value and Reset on Edit formula to suit your needs.
Or another option would be to setup the workflow to trigger off of some other change (something else that is changing at the same time?), and have the workflow include the data change action you already have.
Thanks Marc
One way is if you add an action into your Parent tableโs form view. When you save the parent & child records, the action will be the last one of this process. Then the email/workflow will have all saved child records as well.
Sorry Aleksi, just want to make sure I understand. Do mean create an On Save action for the Quote Detail (child) form that changes the Quote Header (parent) Quote Stage field to โIn Processโ?
Hi Aleksi, can you help to clarify your idea on this one? The action I currently have saved on the Parents form view is the update field to โIn processโ. Are you saying I should a grouped action and include another action with the In Process one - like โgo to another formโ. And in the grouped action run the go to another form first and then run the In process action?
A million thanks!
@Daisy_Ramirez Please check the sample app โParent Workflowโ from https://www.appsheet.com/portfolio/531778
Thanks Aleksi. Sorry for not understanding but how does it differ from updating the field to โIn Processโ? How are we ensuring the child table records are saved? I donโt see an action associated with the child table.
The action is in parent record.
Ok yes, I thought there would be another for the child. This is similar to the action I have setup already except that its updating the Quote Stage field to InProcess of the parent table vs. PDF_SENT to Now() but my email doesnโt include the child records. How would this ensure the child records are saved? Just want to understand.
The action in parent table is triggered after all child records are saved.
Ah ok. So it appears Iโm in a sense doing the same by updating the Quote Stage field to "In Process. Youโd probably have the same issue with inconsistency if the PDF_Sent field just didnโt get updated.
Thanks Aleksi, Iโll keep at it
Youโre welcome
Hi Jon, aha! I get what you and Alex are doing here. Iโd like to test this over the weekend when the client is out so Iโll probably run through this a few times and reach out if thereโs a question.
I thinks this might be it!
Thanks Jon and Alex!
User | Count |
---|---|
42 | |
34 | |
27 | |
23 | |
16 |