Upsert with multiple UIDs

I think you have an extra curly bracket level. Before sending it to code, try to run it in Ratel UI first.