=>Fetch lowest sku prices from amazon ec_l1.csv and hw_l1.csv =>Fetch rules from price_management.price_rule_stores for ebay_sds store and sku type is b2b. =>Fetch rules from price_management.price_rule_stores for ebay_sds store and sku type is b2c. =>Fetch details from price_management.price_updates_on_marketplaces for ebay_sds store and as_per_rule=0; =>Get sku and current price from Reports.ec_all_listing table =>Get sku and current price from Reports.hw_all_listing table =>Fetch sku,Minimum_price,Maximum_price,Our_final_price from fcsusdbadmin_notions_dropship.Essential_ebay table =>Fetch sku,Minimum_price,Maximum_price,Our_final_price from fcsusdbadmin_notions_dropship.hd_supply_ebay table =>Fetch sku,Minimum_price,Maximum_price,Our_final_price from fcsusdbadmin_notions_dropship.buy_season_ebay table =>Fetch sku,Minimum_price,Maximum_price,Our_final_price from fcsusdbadmin_notions_dropship.notions_sd300_ebay_new table =>Fetch sku,Minimum_price,Maximum_price,Our_final_price from fcsusdbadmin_notions_dropship.KW01_ebay_dropship table =>Fetch sku,Minimum_price,Maximum_price,Our_final_price from fcsusdbadmin_notions_dropship.Leemarpet_ebay_dropship table =>Fetch sku,min_price_ebay,max_price_ebay,final_price_ebay from econthen_portal.b2b_price_mgt table =>Fetch sku,Min_price_ebay,Max_price_ebay,final_price_ebay from price_approval.all_price_PET_b2b table =>Fetch sku,Min_price_ebay,Max_price_ebay,final_price_ebay from price_approval.all_price_approval_NM01_new table =>Delete values from Reports.ebay_sds_price_mgt =>Read ActiveInventoryReport.csv file (downloaded from Ebay SDS) =>Fetch sku,item_id and current_price from Reports.ebay_sds_price_mgt =>Check if prices are set for file sku if not set, then insert to insert_data array =>Next we check if any sku price is not set by checking the insert_data array count is >0 if found we check if sku is LMO1 =>By applying the rules fetched from price_rule_Stores we calculate the new price accordingly. =>if we dont find the price, then we check if the sku price is found from ec_l1.csv file =>if we still dont find the price, then we take the final price (taken from individual tables) =>Next we check if the price is in the min and max price range =>next we check if price is <=0 =>then we take the existing price from Active Inventory file =>Insert the newly calculated price into Reports.ebay_sds_price_mgt table =>Fetch sku,item_id,current_price from Reports.ebay_sds_price_mgt table for current price != previous price and current price !=0 =>Looping through each skus we check if it exists in b2c sku prefix list (from price_rule_store) if it exists, then check=1 we check if it exists in b2c sku prefix list2 (from price_rule_store) if it exists, then check=1 we check if it exists in b2b sku prefix list (from price_rule_store) if it exists, then check=1 we check if it exists in b2b sku prefix list2 (from price_rule_store) if it exists, then check=1 NEXT we make the sku prefix as b2b we check if it exists in b2c sku prefix list (from price_rule_store) if it exists, then check=1 we check if it exists in b2c sku prefix list2 (from price_rule_store) if it exists, then check=1 we check if it exists in b2b sku prefix list (from price_rule_store) if it exists, then check=1 we check if it exists in b2b sku prefix list2 (from price_rule_store) if it exists, then check=1 =>if sku doesnt belong to any of prefix list set,then we skip it(ie check==0) =>If check==1 then we move the sku to final array with values "Revise","Itemid" and "StartPrice" =>If final_array count is less than or equal to zero, then we jst place the header inside the array. =>Price_Update file is created, and we write the final array values inside it. =>Script sub_upload_price.php => Generate ebay ec token using api =>create task and get task id =>using task id and api, upload file =>Send email with file as attachment script complete.