The key would be to have that mapping of ID and unique URL key already setup on your external service. For instance: the-fancy-name-of-your-product = productID 876109234
OR
You could have 2 parameters in your URL for instance /products/the-fancy-name-of-your-product/876109234. This will allow you to get some SEO as well as still get the ID as needed