Cannot figure out role-based pricing rule for custom Product Display/Variation in Commerce Kickstart After working thru the Commerce tutorial and understanding roles, I thought it would be straightforward to set up a pricing rule based on user role, but I cannot seem to build the correct "Action" in Rules.

I want to reference a "Dealer Price" field in a Product Variation is the User Role = "dealer"

Error: Data selector commerce-line-item:commerce-product:field-dealer-price:amount for parameter amount is invalid.

Here are the steps I took to get to my current spot:


In a custom Product Variation "Bikes", I created a new field "Dealer Price" that mirrors the "Price" field that is already part of Commerce Kickstart
Dealer price
Field Type: Price
Widget: Price with Currency
2, Created role "Dealer"
Initiated creation of pricing rule
Store Settings >> Pricing Rules
Add Pricing Rule
Add Event: Calculating the sell price of a product
Add Conditions: 1. User has role(s): Parameter: User: [site:current-user], Roles: dealer; 2. Entity has field: Parameter: Entity: [commerce-line-item], Field: commerce_product; 3. Entity has field: Parameter: Entity: [commerce-line-item], Field: field_dealer_price
Then, I get stuck with Add Actions:
Select action to add: Commerce Line Item: Set item to specific amount
Line Item: Data Selector: commerce_line_item (Already inserted)
Amount: [Click on Switch to Data Selector]: commerce-line-item:commerce-product:field-dealer-price:amount
or commerce-line-item:commerce-product:field_dealer_price:amount or commerce-line-item:commerce-product:field-dealer_price:amount


I get an error msg when trying to reference the new price field "Dealer Price".

I feel like I am missing a connection within Commerce that ties the Product Variation to the commerce_line_item, but I haven't been able to identify the missing link. My products show up correctly in the shopping cart, so that hasn't been an issue.

Any help in tying the concepts of "Roles", "Rules", and "Commerce Kickstart" together is appreciated.

Thanks,
Entity has field: Parameter: Entity: [commerce-line-item], Field: field_dealer_price
  


Your price field won't be on commerce-line-item. It will be on commerce-line-item:commerce-product. You need to check for it there.


  
  Amount: [Click on Switch to Data Selector]: commerce-line-item:commerce-product:field-dealer-price:amount or commerce-line-item:commerce-product:field_dealer_price:amount or commerce-line-item:commerce-product:field-dealer_price:amount
  


So since the field_dealer_price is on the product instance, you'd be looking at this: commerce-line-item:commerce-product:field-dealer-price:amount

An example, without the role condition, would look like this:

{ "pricing_from_another_field_example" : {
    "LABEL" : "Role based pricing example",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "rules", "commerce_line_item", "commerce_product_reference" ],
    "ON" : { "commerce_product_calculate_sell_price" : [] },
    "IF" : [
      { "entity_has_field" : { "entity" : [ "commerce-line-item" ], "field" : "commerce_product" } },
      { "entity_has_field" : {
          "entity" : [ "commerce-line-item:commerce-product" ],
          "field" : "field_dealer_price"
        }
      }
    ],
    "DO" : [
      { "commerce_line_item_unit_price_amount" : {
          "commerce_line_item" : [ "commerce_line_item" ],
          "amount" : [ "commerce-line-item:commerce-product:field-dealer-price:amount" ],
          "component_name" : "base_price",
          "round_mode" : "1"
        }
      }
    ]
  }
}