Problem Statement: We need to update the BPF and move to the next stage using Power Automate. The change to BPF should happen after the DocuSign Envelope is Sent.
In our scenario, DocuSign and CRM are not integrated and so we will be using Power Automate to help us achieve the task.
When DocuSign Envelope is sent, trigger Power Automate by using the DocuSign connector. The Envelope event here will be Sent.
Since our DocuSign is not integrated with CRM, we cannot complete the update of Opportunity, until we get the Opportunity ID.
As a workaround, we have hidden the Quote Id on the Proposal during generation of proposal. On trigger of Power Automate, we extract the Quote ID from the document.
To know more about it, you can refer the blog https://www.cloudfronts.com/close-quote-when-docusign-envelope-is-completed-using-power-automate/
In this blog I have directly saved Opportunity ID in Compose Action.
To update the business process flow, we need to get the BPF record as below:
List the Business Process Flow for the Opportunity ID.
Get the Stage Id to which you want to set your business process flow and store in a Compose action.
To know how to get Stage Id, refer my blog https://www.cloudfronts.com/get-stage-id-of-business-process-flow-stages/
Store the path traversed by the Opportunity in Compose. You can use the traversed path directly also.
Update the BPF record
Set the Active Stage and traversed path.
Active Stage= processstages(ID of stage you want to set as active)
Traversed Path= concat(existing traversed path,’,’,stage id)