You need to sign in to do that
Don't have an account?
workflow rule on asset object to trigger single email to related contact - compare multiple records
I need to build a workflow rule that does the following:
- Looks at newly created asset records.
- Checks a particular field on the asset record to see if it's false.
- Checks a particular field on the related contact record to see if it's false.
- Sends a single email to the related contact email if 2 & 3 above are false.
I'm able to do a basic version of this, no problem, but how do I prevent >1 email going to a contact if multiple assets are created simultaneously, as is often the case for us?
For example, our most popular SKU (Studio '09 Pro) includes 4 products, which are logged in our SFDC account via the salesforce.com API as 4 separate assets with a common order #, related to the contact (see this screenshot for an example).
With the current time-dependent workflow action I'm testing, 4 separate emails are sent, 1 for each asset.
So how can I have the workflow rule trigger a single email for each unique order number? Is that possible - to have a workflow rule compare data in multiple asset records vs. looking at a single record's data?
It seems like it would be if there were a way to stagger the asset creation a bit, then have the workflow rule check to see if a field had been flagged for a particular order number...
Thanks!
You can't do that with workflow. Workflow will trigger once for each object.
If you are literally adding these assets simultaneously and in bulk (as via the API) then you can do this with an Apex trigger instead. Apex triggers do fire in bulk, i.e. one trigger will be fired for multiple inserts or updates.
If you're just adding them manually one after another, then you'll probably be out of luck, although you might be able to use Cronkit or something to aggregate manual asset adds and send one email for all the assets added in the last 15 minutes or something.
Thanks for the quick reply, werewolf!
Yes, we are creating the assets simultaneously via the API. So just to clarify: We could do a time-delayed single email for each unique order #, but it sounds like I'd need to get one of our developers involved to create the Apex trigger as part of the asset creation code we have now via the API?
Thanks again.
OK, thanks, werewolf.
I guess the key point is that I need to get one of our devs involved since I'm no programmer and haven't done anything with Apex. :)