v3 SFDC Flow template for Order update
Learn more about the "Opportunity to Ambassador Order Update" flow template provided with the Salesforce Manage Package for Ambassador.
The "Opportunity to Ambassador Order Update" flow template in Salesforce is provided by the Ambassador Managed Package. You can change the triggered object in the Start element to any standard or custom object as needed.
What it does:
When an Opportunity with a Referring Shortcode moves to your “won” stage, it updates the corresponding Ambassador Order via API (e.g., status, revenue).
When it runs:
On Opportunity update where Short_Code__c is populated and StageName = DESIRED_STAGE.
How you can customize:
-
Adjust the stage condition (or add more conditions).
-
Open the Apex Action and add/remove fields (e.g., pass additional amounts or custom statuses).
-
Include any other Opportunity fields you want reflected in the update.
-
The SFDC object stage/status (e.g. Opportunity Closed Won) should be mapped to the Order External Status (GetAmbassadorOrdercExternal_Status_c).
-
The SFDC object ID (ex. opportunity id) should be mapped to Order External ID (GetAmbassadorOrdercExternal_Id_c)
-
The Opportunity revenue should be mapped to Order Revenue Amount (GetAmbassadorOrdercRevenue_Amount_c)
-
You can choose to create Order meta data fields in Ambassador to map additional data from Salesforce to the Order in Ambassador.
-
Summary of elements:
-
Start (Opportunity after save): Triggers when Short_Code__c is populated and StageName = Closed Won; runs asynchronously.
-
Get_Company (record lookup): Finds the active Company__c; supplies company Id.
-
Get_Order (record lookup): Locates the matching Order__c via the Opportunity Id.
-
Update_Order_Via_API (Apex Action UpdateOrderAction): Updates the Ambassador Order (e.g., revenue and status) using the company Id and the order’s external Id.