Amazon Ec Audit Steps: 1. First, Generate Amazon_ec_all_listing.csv file in folder files_to_compare =>File name: Amazon_ec_all_listing.csv => External script name: sub_amazon_ec_download_listings.php 2. Delete onedrive file and log table data's above 30 days => Onedrive file link: Marketplace_audit_Files/Amazon_ec_audit => log table: script_execution 3. If listing file found then delete data’s in reports.amazon_ec_listing table. Otherwise complete script with out processing further 4. Get Amazon_ec_all_listing.csv file data and insert into table amazon_ec_listing in database reports 5. Get restricted products for amazon marketplace and discontinued => field value: based on marketplace like amazon or discontinued 6. Get all sku details in Amazon_ec_Listing table and econthen_portal.4p_inventory => For count: field value based on - sku => For active sku: field value based on - sku and qty greated than 0 7. If amazon activ count greater than 0 then => Compare with 4p inventoery array active count and increase active count value => If not matched with 4p inventory array and count is equal to 1 then add it in a problematic array => If not matched with 4p inventory array and count is greater than 1 then add it in a ignored sku list array 8. Caluclate amazon inactive count based on below formula and update the count details in reports.amazon_ec_audit => Ex: $CA10_count_amazon_ec_inactive = $CA10_count_catalog_active - $CA10_count_amazon_ec_active; 9. The prefix sku taken are CA10, DE01, FC01, MI01, KW01_b2b, ES01_b2b, MR01_b2b, LM01_b2b, NM01_b2b, WI01_b2b, NM01, LM01, ES01, KW01. Please do the steps 6-8 for these skus 10. Finally, prepare document for not listed, problematic and ignored sku list and mail the details. Also upload generated files in onedrive and delete it in local folder