FlowRunner
Features Pricing
Theme
Start Free

Detention past free time approved in Teams, then billed and paid in McLeod

When a McLeod load delivers, this flow checks each stop's arrival and departure against free time and asks your ops manager in Teams before it bills the customer and pays the carrier.

The prompt

When a load is delivered in McLeod, look at each stop's actual arrival and departure. Start the clock when the appointment window opens if the truck was early, take off our 2 free hours, and count nothing at a stop the truck reached after its window closed. If there's detention left and the load doesn't already have a detention charge or detention pay, post a card to our ops channel in Microsoft Teams with the stop times, the hours, what we'd bill the customer and what we'd pay the carrier, with Add detention and No detention buttons, and wait for the ops manager. If they approve, add the detention to the carrier's extra pay and to the customer's charges on the load in McLeod, and confirm in the Teams thread.

FlowRunner Prompt to Flow built this flow from that request. Here it is as it opens in the editor.

The flow

Yes No Yes Asks a person Ask the opsmanager Action Bill the customerdetention Action Confirm in theTeams thread Code Work out detention ateach stop Condition Add the detention? Action Pay the carrierdetention Starts the flow Load delivered inMcLeod Action Get the stop timesfrom McLeod Asks a person Wait for the opsmanager's answer Condition Detention past freetime? Action Note no detentionin the thread

Download the file, then in FlowRunner click + beside Flows, pick it under Import a Flow Version and click Create. How importing works

What each step does

  1. Load delivered in McLeod Checks McLeod every 5 minutes for loads that just moved to Delivered.
  2. Get the stop times from McLeod Reads the load's stops with their appointment windows and actual arrival and departure, the customer charges, the carrier and the carrier's extra pay.
  3. Work out detention at each stop Counts the time on site at each stop from arrival, or from when the window opens if the truck was early, takes off your free time and rounds up to the quarter hour. A truck that arrived after its window gets nothing at that stop.
  4. Detention past free time? A load with no detention past free time, or one that already carries a detention charge or detention pay, stops here.
  5. Ask the ops manager Posts an Adaptive Card to your ops channel in Teams with every stop's times, the billable hours, the customer charge and the carrier pay, and two buttons, Add detention and No detention.
  6. Wait for the ops manager's answer The run waits for the click. No detention leaves the load as it is and says so in the Teams thread.
  7. Pay the carrier detention Adds the hours at your carrier rate to the carrier's extra pay on the movement in McLeod.
  8. Bill the customer detention Adds the hours at your customer rate to the load's charges under your detention charge code, then confirms both amounts in the Teams thread.

Before you turn it on

  • Enter your McLeod server address and API token, or a user name and password, in the McLeod LoadMaster settings, and connect your Microsoft Teams account. The card is posted as that account, so it must be a member of the ops channel.
  • In Teams, open your ops channel's menu and choose Get link to channel. Put the groupId value from the link in the flow setting Teams team ID, and the part after /channel/ in Teams channel ID, written as 19:[email protected] (%3a is a colon and %40 is @).
  • Set Customer detention rate per hour and Carrier detention rate per hour to your terms, and change Free time hours (2), Detention charge code (DET) and Detention pay code (DET) if yours differ.
  • Copy the URL of the block Wait for the ops manager's answer into the flow setting Answer link. The card's buttons open it.