Lost in Transit - Webform
This flow triggers a webform for Lost in Transit barcodes on the EvriCloud client portal.
Please reach out to your DG account team to enable this flow into your dashboard
Overview
This document explains the steps and functionality of the browser automation script designed for interacting with the EvriCloud client portal. The script uses Puppeteer to automate the process of logging in, filling out a web form, and submitting an enquiry.
Configurations
- Flow inputs
- Barcode - Evri tracking number to be processed
- Flow configurations
- Evri Password - Password to log into https://clients.evricloud.co.uk
- Evri Email - Email to log into https://clients.evricloud.co.uk
- Webform First Name - First name when submitting the Webform
- Webform Last Name - Last name when submitting the Webform
- Webform Email - Email to use when submitting the Webform
- Webform Enquiry Comment - Message to send with the Webform
Functionality
The script performs the following steps in the background everytime runs:
- Launch Browser: The script initializes and launches a Chromium browser using Puppeteer, with specific configurations to facilitate the automation.
- Navigate to Login Page: The script navigates to the EvriCloud client portal at https://clients.evricloud.co.uk/. It waits for the page content to load completely.
- Login: The script waits for the username, password, and submit button elements to be available on the page. It enters the provided Evri email and password into the respective input fields. The login process is initiated by clicking the submit button.
- Navigate to Web Form: After successful login, the script waits for the “Web form” button to appear. It clicks the “Web form” button to navigate to the client enquiry web form section.
- Wait for Web Form to Load: The script waits for a short period to ensure all form fields are fully loaded and ready for interaction.
- Fill Enquiry Form: The script waits for the form fields (first name, last name, email, barcode) and the search button to become available. It fills in the provided first name, last name, email, and barcode into the respective fields. The script then clicks the “Search” button to proceed.
- Navigate Through Enquiry Options: The script waits for and clicks the “Delivery Enquiry” button. It waits for and clicks the “My parcel hasn’t been delivered yet” button. It waits for and clicks the “My parcel hasn’t moved on tracking” button.
- Enter Enquiry Comment: The script waits for the comments textarea to appear. It enters the provided enquiry comment into the comments textarea.
- Submit Enquiry: The script waits for the “Submit Enquiry” button to become available. It clicks the “Submit Enquiry” button to submit the form. After submission, the script waits for a specific confirmation message indicating the enquiry was successfully created.
- Verify Submission: The script checks for the presence of an element with the text “Enquiry Created” to confirm that the enquiry has been successfully submitted.
- Close Browser: The script closes the browser session, logging the success or failure of the automation process.
Outputs
The flow will return the following output: Claim sent successfully. This is a boolean, which will return True if the full script ran successfully and a claim was submitted against the barcode, or False if there was an error when performing the action.
Updated 6 months ago