How to get next valid `product_id` value within Rules for drupal commerce product? I'm using Rules to create drupal commerce products. The problem is that the product_id is not assigned.

Since the Rules settings page for creating products only gives the following options, I assumed that the product_id would be generated automatically:

Entity type, SKU, Type, Title, Creator, Price, Provided variables.

If the product_id has to be added manually (within Rules) how would I obtain the correct value to use? (Or is there a setting I am missing within Rules?)

Cheers!
You cannot set the product ID manually, because it depends on the AUTO_INCREMENT value in your commerce_product database table. What you can do is use "Save an entity" on the product and check the "Force saving immediately" checkbox. The entity will have an ID after that, though I've had scenarios in Rules where for some reason the ID wasn't immediately added to the entity in memory. If this happens to you, you'll just have to use "Fetch an entity by property" after saving and load the product using the SKU or something and use the fetched_entity from then on.