4 weeks ago
Hello community!
I am working on a recipe that syncs new/updated opportunity records created in CRM to a MAP. I have tested this recipe, and it's working as expected. However, I want this recipe to process and sync existing opportunity records in CRM to the MAP. I'm using a new or updated opportunity in CRM trigger in the recipe, which only processes records created/updated after turning on the recipe. How do I sync existing opportunity records? I set the "When first started, this recipe should pick up events from" option in the trigger before turning it on, thinking it'd pick events from the specified date-time, but unfortunately, even after setting this date, it's picking up new/updated opportunities -- not the opportunity records that were created/updated from the date time mentioned in the "When first started, this recipe should pick up events from" option. Appreciate any help in this regard. Thank you!
4 weeks ago - last edited 4 weeks ago
It sounds like you overlooked the need to true-up the MAP before starting your steady state process. You could touch all records in the CRM resulting in each record triggering your recipe, but that may produce undesirable data in the CRM. Or, you can create a new recipe that queries records from the CRM and then processes them.
The "When first started..." timestamp is applied to events that are received after Workato creates the webhook. If the webhook was created on Wednesday, it won't be able to process events prior to Wednesday because the webhook wasn't present.
As a design principle, I suggest always creating two recipes when working with application triggers/webhooks. The first recipe receives the trigger from the calling system, and then it calls a second function recipe to do the "work". This allows you to call the function recipe from elsewhere, meaning you could call it when the first recipe receives an event, or you could make a third recipe that queries for a bunch of records and submits them each to the function recipe for processing. This is how I would work my way out of your situation.
4 weeks ago
Or, you can create a new recipe that queries records from the CRM and then processes them.
Thanks! How to go about creating this recipe? This won't be a trigger, of course, right? FYR, I am trying to sync NetSuite Opportunities to HubSpot as deal records.
4 weeks ago
When creating a recipe there's a recipe type called a "Function Recipe". Use that one.
Once the function recipe exists, use a "function" action in the first recipe to call the function recipe.
You can configure the function recipe to require certain input. Recipe 1 could either hand off the entire payload to Recipe 2, or you can "double dip" by having recipe 2 query NetSuite to get all of the data for the calling record again.
The general flow looks something like this:
Here are some other steps to help you along:
4 weeks ago
This is helpful, but how would I query the existing opportunity records in NS? That's still unclear.