In this case we will use flow to automatically invoke a RaiseNow public Apex method to execute a recharge for an opportunity after the initial charge failed.
Pre-Conditions
We will use two custom fields on the opportunity (donation) record in Salesforce:
Record triggered flow
We now create this record triggered flow with a scheduled path:
Our start condition will be an opportunity with a maximum number of failed charges and an updated StageName to "Closed Lost":
We add a scheduled path to run in 15 days. You can of course choose other values but an immediate recharge will probably not be successful:
We add a formula to calculate our failed charge counter increment:
We execute the RaiseNow Apex action to recharge the opportunity, providing the opportunity Id as an argument to that function:
We set a reason for the recharge on the opportunity so we can better understand why this action was executed:
Comments
0 comments
Please sign in to leave a comment.