Scale ticket weight checked against the McLeod load
Drivers email scale tickets. Textract reads the weights, the ticket is filed on the McLeod load, and a weight that's off from McLeod's goes to ops in Slack to decide.
The prompt
When a driver emails a scale ticket to our dispatch inbox in Gmail, read the gross, tare and net weight, the ticket number, the scale, when the truck was weighed and any load or BOL number on it. Find the load in McLeod by the load number in the email, or the number on the ticket. If there's no match, send the ticket to ops in Slack. If there is, file the ticket on the load. Work out the cargo weight from the net weight, or gross less tare, and compare it with the McLeod load weight. If it's within 1,000 lb, the gross is under 80,000 lb and the read is clear, stop there. Otherwise ask ops in Slack with a button to set McLeod to the ticket weight and one to keep McLeod's weight, wait for the answer, and update the load weight if they say so.
FlowRunner Prompt to Flow built this flow from that request. Here it is as it opens in the editor.
The flow
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
- New scale ticket email Checks your Gmail inbox every 5 minutes for an email with scale ticket or weight ticket in the subject, and saves the attached ticket.
- Read the scale ticket Textract answers questions about the ticket: gross, tare and net weight, ticket number, the scale, when the truck was weighed, and any load or BOL number. A ticket it can't read goes to ops in Slack with the reason.
- Find the load in McLeod Looks the load up by the load number the driver gives in the email, or the number printed on the ticket. When nothing matches, the ticket goes to ops in Slack to file by hand.
- File the ticket on the load Adds the ticket to the load in McLeod Imaging under your scale ticket document type.
- Weight matches McLeod? Takes the net weight, or gross less tare, as the cargo weight. Within your allowed difference of McLeod's weight, under your gross limit and read with confidence, the ticket stays filed and nothing else happens.
- Ask ops Anything else goes to ops in Slack: the ticket's weights next to McLeod's, the difference and what's wrong, with a Set McLeod to the ticket weight button and a Keep McLeod's weight button.
- Wait for ops' answer The run waits for the click. Keep McLeod's weight leaves the load as it is and says so in the Slack thread.
- Update the load weight Changes the load's weight in McLeod to the ticket's cargo weight and confirms it in the Slack thread.
Before you turn it on
- Connect your Gmail and Slack accounts. Enter your AWS access key, secret key and region in the AWS Textract settings, and your McLeod server address and API token, or a user name and password, in the McLeod LoadMaster settings.
- Copy the URL of the block Wait for ops' answer into the flow setting Answer link. The Slack buttons open it.
- Set Scale ticket document type to the McLeod Imaging document type you file scale tickets under (SCALE is filled in). Change Weight difference allowed (lb) (1000), Gross weight limit (lb) (80000) and Minimum read confidence (80) if yours differ.
- Pick your ops Slack channel in Send unreadable ticket to ops, Send unmatched ticket to ops and Ask ops. The two confirmations reply in the same thread.
- Textract reads one page per ticket, up to about 5 MB, from the email's first attachment. Ask drivers for a photo or a one-page PDF, and narrow the Gmail search in New scale ticket email if other mail in that inbox uses those words.