I suggest checking out the Product Variants file. This has what I think you're looking for. Key is to look at the columns ExternalSourceName attribute and then the cooresponding source name in the ugVariants_OnExternalDataBound event.
/CMSModules/Ecommerce/Pages/Tools/Products/Product_Edit_Variants.aspx.cs