Skip to content

This Python script automates data updating in TLD-CRM by scraping information from the CMS portal, handling Azure Key Vault authentication, and utilizing web interactions, API requests, and email notifications.

Notifications You must be signed in to change notification settings

clearviewdev/cvm_tld_marx

Repository files navigation

cvm_tld_marx

TLD CRM Data supplement with Marx Scraped Data.

This Python repository automates the process of updating data in the TLD-CRM system based on information obtained from the CMS portal. It uses Selenium for web automation and interaction with the CMS portal, fetches data from an input CSV file, performs validations, and updates records in TLD-CRM. The script also handles Azure Key Vault authentication, retrieves One-Time Passcodes (OTPs) from M365 mailboxes, and sends out email notifications upon completion.

Requires a single argument (1, 2 or 3). This script generates a Tiers.CSV file depending upon the chosen input. The generated CSV file will be used as an argument for the MARX script in the next step.
Command-line usage:

python3 TLD_Tiers_Updated.py <1, 2, 3 based on required tier>

No arguments required. This script retrieves policies that were sold the previous day, and resets the status of ‘marx_plan_change_result’ variable to ‘None’ for each lead.
Command-line usage:

python3 TLD_Reset.py

Requires 2 arguments containing the name of the CSV generated through the TLD_Tiers script as well as the number of accounts to be used.
Command-line usage:

python3 MARX.py <CSV file name i.e Tier1_Policies.csv> <Number of threads to launch i.e 2>

The above command will utilize 2 CMS accounts to retrieve the data requested in Tier1_Policies.csv file.

Contains relevant data to find and match Contract Number and retrieve Carrier Name and Plan Type.

Some important steps to take care of:

  • contract_directory.xlsx file must always be in the same directory as the MARX.py script. It is crucial for finding the Carrier Name and Plan Type.

  • MAKE SURE all the relevant secret variables for multiple CMS accounts are present inside the Azure Key Vault before proceeding.

  • IT IS RECOMMENDED to run TLD_Reset.py script before every Tier1 extraction procedure in order to extract the fresh status of each policy.

  • DO NOT execute multiple instances of MARX.py at the same time. This could cause confusion with fetching the 2FA code from the email (as multiple OTPs would be sent out for each instance). Recommended time between each run is: 3-5 minutes. Look for and replace any IDs, Keys and Passwords required for your own instance.

About

This Python script automates data updating in TLD-CRM by scraping information from the CMS portal, handling Azure Key Vault authentication, and utilizing web interactions, API requests, and email notifications.

Topics

Resources

Stars

Watchers

Forks

Languages