Syncing And Unsyncing Quote With Opportunity Using Flow And Process Builder
Auto Sync And Unsync Accepted Quote with Opportunity Using Flow And Process Builder
Synced Quote is field on opportunity object. This field is lookup field with Quote object. IsSyncing field on Quote object is not a writable field. As we can not perform any action on IsSyncing field of Quote object. We have to make IsSyncing checkbox true using lookup filed (Synced Quote) on opportunity object. To automate Quote Sync Process, you have to populate the value in the Synced Quote field.

1. Click on Name | Setup | App Setup | Create | Workflows & Approvals | Flows
2. Click on New Flow, it will open flow canvas for you, now create one Text variable VarT_QuoteId to pass the Quote ID. We will use this variable in the flow, as shown in the following screenshot.
Likewise, create one more Text variable VarT_OpportunityId to pass the Opportunity Id.
3. The next step is to update the Synced Quote field with Quote Id. For this, we will use Record Update element. Drag-and-drop Record Update Element on the window and fill the details as shown in the following screenshot.
4. Finally, your Flow will look like the following screenshot.
5. Click on the Save button and save the Flow with the name Update Sync Quote as shown in the following screenshot.
Activate the flow. Dont forget to click on it to make it active.
Now you are done with the flow.
We will create process builder on Quote object to Launch a Flow, only when a Quote is accepted by the customer. To create a Process on the Quote object follow the below instructions.
1. Click on Name | Setup | App Setup | Create | Workflows & Approvals | Process Builder and click on the New button, Enter Name, API Name and click on the Save button.
2. Now click on Object node to add object, Select Quote object, in this case and set the evaluation criteria as shown in screenshot.
3. Click on the Save button and define the Process criteria in next step. Enter Criteria Name, Create Executing Action and Set Filter condition as shown below.
4. Save the process. Now select Flows in the Action Type as we are going to use Flows over here.
5. Save the Action. Finally, the Process will look like the following screenshot.
Don’t forget to active the Process by clicking on the Activate button.
- Now check in the Quote object when Status field on the quote object will "Accepted" then IsSyncing checkbox turns true. Syncing will start.
- This is all about start syncing. But what if Status field on the quote object will change into "Declined" from "Accepted". Start Syncing is still turned on. We have to make IsSyncing checkbox false to stop syncing. Now we will see how to Stop Syncing.
- Create flow as we did before. Only make change in Point No 3 where we are updating SyncedQuoteID = VarT_QuoteId. In this flow we will keep it blank. Means we will not choose anything like VarT_QuoteId.
- Now, Save the flow Update to Stop Sync Quote. Don't Forget to activate the flow.
- Now, Open the process builder[auto Sync Accepted Quote With Opportunity] created previously. Enter into False part of process builder. Choose Formula evaluates to true in Step No 3. Formula will be like NOT(ISPICKVAL([Quote].Status , 'Accepted') )
- All Process will be same only add Update to Stop Sync Quote in Step 4. Don't Forget to activate the process builder.
- Now, Change picklist value from "Accepted" to "Declined" and check. IsSyncing checkbox will be unchecked and syncing will be stop.
Hello,
ReplyDeleteI have a issue with the second Part "Declined".
Syncing is disabled but the check box is always checked. :(
Any idea ?
Thank you
We can't save this record because the “Quote Sync Update” process failed. Give your Salesforce admin these details. An error occurred when executing a flow interview. Error ID: 911626274-421383 (-525322883) getting this error
ReplyDelete