Skip to main content

Create a finalize opportunity flow

The finalize opportunity flow marks the opportunity as finalized (closed) in AppDirect when it is marked "Closed/Won" in Salesforce.

To create a finalize opportunity flow

  1. In Salesforce, click the gear icon and select Setup.
  2. Go to Platform Tools > Process Automation > Flows.
  3. Click New Flow.
  4. Select Record-Triggered Flow and then click Next.
  5. Select Auto-Layout. Flow Builder automatically organizes the connectors for you.
  6. Click Edit.
  7. Select the following:
    Trigger the Flow When: A record is updated.
    Run the Flow: After the record is saved.
  8. Click Choose Object and then search for and select Opportunity. Add the following values for fields in the Choose Object dialog:
    FieldValue
    Condition RequirementsAll Conditions Are Met (AND)
    AppDirect__AppDirect_ID__cOperator: Is Null
    Value: False
    AppDirect__AppDirect_Purchase_ID__cOperator: Is Null
    Value: True
    StageNameOperator: Equals
    Value: Closed won
  9. Click Done.

To add an action element to the Record-Trigger flow

  1. Click the + under the Record-Triggered Flow branch of the element.
  2. Select Action as the interaction.
  3. Filter by Type and then select Apex Action.
  4. Search and select Finalizes Opportunity in AppDirect**.**

    Note Ensure that you select the correct Apex action. If the wrong Apex action is selected, data does not move to AppDirect and errors will be logged . For example, Selecting Transmits Opportunity to AppDirect instead of Transmits Opportunity Item to AppDirect.

  5. Enter the following values to the field New Action dialog:
    FieldValue
    LabelFinalize Opportunity
    API NameFinalize_Opportunity
    DescriptionFinalizes an opportunity in AppDirect when Stage = “Closed Won” in Salesforce
    Record ID{!$Record.Id}
  6. Click Done.

To save the flow

  1. Click Save
  2. Add the following values to the fields in the Save the Flow dialog:
    FieldValue
    Flow LabelFinalize Opportunity in AppDirect
    Flow API NameFinalize_Opportunity_in_AppDirect
    DescriptionFinalizes an opportunity in AppDirect when Stage = “Closed Won” in Salesforce
  3. Click Save.
  4. Click Activate. The flow is activated and is displayed in the All Flows table.

Was this page helpful?