first lets think that we have no API or JASON and we have 2 tables :1 recipient table that comes from Datasource 1 in your case CSV and products table that lest say comes from some datasource .
in XMPie you'd setup a User View that will be something like select * from Products where ProductCodeID = |->[ProductCodeID] //
XMPie does not support direct requests to a MS web service or a Jason so whhat can be done
1) You can write a compiled store procedure and pass parameter that will talk to Jason at run time , but XMPie will store-procedure on each recipient list
I do not think that this is efficient
2) XMPie supports User View that can be constructed from the XML string and you can pass it via varibale via customization . in theis case you will have to puss product table as an XML that your JASON return . Technique well described in the XMPie uPlan User Guide. But main problem is that it is not reqular table and we do not do lookup so end up manipulate your XML in uPlan using Javascript and a a size of SOAP request maybe an issue.
3) I'd do a single request to Jason and pull up to day info and create some table or even xmpie datasource and point production on both those tables, or even better Id import this CSV file to my own table and create this product table and pass xmpie query for recipient list as well via API you can change query of the user view.
Igor.