Hi there, i'm fairly new to workflows and am seeki...
# suiteflow
a
Hi there, i'm fairly new to workflows and am seeking guidance. I'm trying to send out a customer survey email, that looks at Sales Orders that were fully billed 'x' days ago. I only want one email to go to a Customer, based on a particular Sales Order and I need to ensure they do not receive another email within 30 days from the last email sent (if they got one). Furthermore, the email must send to the specific email address captured on the Sales Order. I have created a custom field on the Customer record ("Survey Last Sent Date") and in my Workflow, for my 1st Action, I want to set a condition that checks the Survey Last Send Date and if empty or date is greater than last 30 days, it can proceed. I don't seem to be able to set the condition using the Visual Builder and my formula knowledge is very limited! Can anyone shed any light on how I can achieve this?
a
@Allison I would setup your workflow as a transaction type, subtype = Sales Order. Then in your criteria you can do a join to the customer record to check your date And also use the email from the SO at the same time
n
@Allison my approach would be to identify these daily sends in a Saved Search as searches have more flexibility for your criteria. Then you schedule your workflow on that saved search.
a
Hi @AI1 - I had attempted to do it based on Transaction>Sales Order as you suggested... however to do this, I need to create an Action in the workflow that updates the Customer record (custom field: Survey Last Send Date) with the current date after running through each SO result. This is so that if the Customer has more than one Sales Order that meets the criteria, they do not receive more than one email (that day, or within the 30 day period). However because the workflow is Transaction based, I can't access the Survey Last Send Date field (on the Customer record). Unless I'm missing something? Hi @Netsuite Tragic - I did try your suggestion also, but due to my requirements (as noted in above response to Al1), I could only get so far with setting the additional criteria in the SS.
a
@Allison does the customer survey email relate to just 1 Sales Order or many? For example if SO1 triggers an email on 6/1/21 then the customer makes 2 more SO’s that are billed on 6/15/21 those would be skipped because they are within the 30 days But then SO4 is billed on 7/10/21. This would trigger another email because it is outside the 30 day window. Is the next customer email related to SO2, SO3, & SO4? Or just SO4?
a
@AI1 we want to essentially send the survey once, to any customer we have billed (but with a minimum of 30 days between emails). The survey is random - in that it can refer to any SO that meets the criteria (eg. billed x days ago) - however only one survey should be sent (within a 30 day period). To complicate things, it is not uncommon for a Customer to have multiple Sales Orders billed on the same day. So if we are referring to a "Survey Last Sent Date" on the Customer record, this really needs to update per line of the SO results, so that if the workflow encounters a different SO further in the list, but for the same Customer, it will check the field which will show todays date and not send any further surveys (from these results or any other results within the next 30 days). We also want to be able to track the SO the survey relates to so we can review the specific order experience if required.
n
Your transaction search joins the customer record. In the criteria you would have a criteria {trandate} - {customer.survey date} greater than 0. So if your date is still before, it’s a negative and that customer sales order will not appear in the saved search results and not enter the workflow.
a
@Allison you would have been able to do this using 2 workflows (1. A customer based workflow to set the last email sent date 2. A transaction workflow to send the email when the criteria is met) However the complexity of billing multiple SOs on the same day but only sending an email for 1 of them is problematic I think a 3rd workflow might cover this but I’m not 100% sure. If you can get a field on the SO that will sequence the SOs that are all billed on the same day the 2 workflows will work