Add node reference to Product field with rules I am working on a rule to create a node based on a commerce product after it is purchased. So far I've been successful in creating the entity and filling in fields from the product fields. I am having trouble updating a field within the product to reference the node created by it's sale. I'm not receiving an error, but the product field is not updating. I've tried multiple configurations. Here's the rule exported:

{ "rules_create_projects_from_sold_instrumentals" : {
"LABEL" : "Create Projects from Sold Instrumentals",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "commerce_order", "rules_conditional", "rules", "commerce_checkout" ],
"ON" : { "commerce_checkout_complete" : [] },
"IF" : [
  { "commerce_order_contains_product_type" : {
      "commerce_order" : [ "commerce_order" ],
      "product_type" : { "value" : { "instrumental" : "instrumental" } },
      "operator" : "\u003E=",
      "value" : "1"
    }
  }
],
"DO" : [
  { "LOOP" : {
      "USING" : { "list" : [ "commerce-order:commerce-line-items" ] },
      "ITEM" : { "list_item" : "Current list item" },
      "DO" : [
        { "CONDITIONAL" : [
            {
              "IF" : { "entity_has_field" : { "entity" : [ "list-item" ], "field" : "commerce_product" } },
              "DO" : [
                { "CONDITIONAL" : [
                    {
                      "IF" : { "data_is" : {
                          "data" : [ "list-item:commerce-product:type" ],
                          "value" : "instrumental"
                        }
                      },
                      "DO" : [
                        { "entity_create" : {
                            "USING" : {
                              "type" : "node",
                              "param_type" : "recording",
                              "param_title" : [ "list-item:commerce-product:title" ],
                              "param_author" : [ "commerce-order:owner" ]
                            },
                            "PROVIDE" : { "entity_created" : { "pr_created" : "PR Created By Instr Order" } }
                          }
                        },
                        { "data_set" : {
                            "data" : [ "pr-created:field-recording-cover-art" ],
                            "value" : [ "list-item:commerce-product:field-cover-art" ]
                          }
                        },
                        { "data_set" : {
                            "data" : [ "pr-created:field-pr-producer" ],
                            "value" : [ "list-item:commerce-product:field-producer" ]
                          }
                        },
                        { "entity_save" : { "data" : [ "list-item:commerce-product" ], "immediate" : "1" } },
                        { "CONDITIONAL" : [
                            {
                              "IF" : { "entity_has_field" : { "entity" : [ "list-item:commerce-product" ], "field" : "field_project" } },
                              "DO" : [
                                { "list_add" : {
                                    "list" : [ "list-item:commerce-product:field-project" ],
                                    "item" : [ "pr-created" ],
                                    "unique" : "1"
                                  }
                                },
                                { "entity_save" : { "data" : [ "list-item:commerce-product" ], "immediate" : "1" } }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  }
]


Any ideas?
You rule seems to be using the Conditional Rules module ... which does not play well with saving entities like your rule seems to be doing.

You should rework those parts of your Rules Actions to performing equivalent Rules Components. After doing so, you have taken away a possible reason why your rule does not seem to behave as you would expect ... and possibly also solved your issue. For more details on that, refer to the answer to "What&#39;s the alternative to using the Conditional Rules module?".

Debugging is the art of taking away all possible reasons why something doesn't work as you'd expect it to work ...

PS: I'm assuming this question is about D7.