Create the order without a status

Completed
  1. In the Actions pane, search for Read from CSV and double-click Read from CSV file. In File path, select the file-picker icon and browse to Order.csv on your desktop. The full path, such as C:\Users\<username>\Desktop\Order.csv, is filled in for you. Expand Advanced and switch on First line contains column names. Rename the produced variable to fOrdersCSV and select Save.

    Screenshot of the Read from CSV file action with the file path set and first-line-contains-column-names switched on.

Tip

💡 Tip: Reading the file first means a missing or broken file stops the flow before anything is written to Dataverse.

  1. Add a Get current date and time action (under Date time), producing CurrentDateTime. The order should carry the date it was imported.

    Screenshot of the Get current date and time action with its CurrentDateTime variable produced.

  2. Add an Add a new row to selected environment action (under Microsoft Dataverse).

    🔧 Setup check: If you completed Module 2 with this account, a Dataverse connection already exists, and the action opens straight to its parameters. If you're asked to Sign in instead, sign in with your lab account (the same one from Module 2) keep Authentication Type as Oauth, and select Create. If sign-in fails inside Power Automate for desktop, create the connection from the portal instead: https://make.powerautomate.com > Connections > New connection > Microsoft Dataverse, then reopen the action.

  3. Select your Environment, and in Table name select Orders. Wait for the columns to load, expand Advanced, and configure the fields below.

    What you're building here is the automated version of what you did by hand in Module 2's test: create an order, fill in its details and line items, and save it with the status New. It was that save that fired the approval flow. This action is the "create an order and fill in its details" part; the role of the save is played by the status update in Step 7.

    These are the order header values. The CSV supplies only the line items, one product row each. For simplicity, this lab sets the header values as fixed entries here; in a real import, they would come from your file as well, read the same way the line items are:

    • Order Status: leave empty
    • Order Date: %CurrentDateTime%
    • Payment Type: Credit Card
    • Ship City: London
    • Ship Country/Region: United Kingdom
    • Notes:

    Imported from legacy order file by desktop flow.

    These are the fields from Module 2's approval email displays — filling them here means the approvals for imported orders arrive complete, not blank.

Important

⚠️ Important: leave Order Status empty. The status is set at the very end of the flow, after the line items exist — that update is what triggers the approval flow, and by then the order's full value is in place for it to calculate.

  1. Rename the produced variable to fResponse and select Save.

    Screenshot of the complete Add a new row action for Orders with the order date, payment type, shipping, and notes columns configured and the status empty.

  2. Add a Convert JSON to custom object action (under Variables). In JSON, enter:

    %fResponse%
    

    Rename the produced variable to fObject and select Save.

    Screenshot of the Convert JSON to custom object action converting fResponse into fObject.

  3. Add a Set variable action. Name the variable fOrderId, and in Value, enter:

    %fObject['nwind_ordersid']%
    

    This is the created order's unique identifier: the same value used in Module 2 to link the invoice to its order.

    Screenshot of the Set variable action assigning the order's unique identifier to fOrderId.

  4. Select the save icon in the designer toolbar to save the flow.