Access custom billing field in rules using Commerce I have added the field field_e_mail to the Billing profile type in Commerce and would like to use this for sending an confirmation email to the customer (customers never log in). However, I can't for the life of me get hold of the field in rules. I've tried to use Entity has field in different ways, but I still can't get it to work.

What can I do to get the field_e_mail field from Billing into rules and use it for sending a confirmation email?

This is where I am at the moment (test@test.com is just a placeholder where I'd like to put the field_e_mail value):

{ "commerce_checkout_checkout_send_order_activation" : {
"LABEL" : "Send an order notification e-mail (cloned)",
"PLUGIN" : "reaction rule",
"WEIGHT" : "4",
"OWNER" : "rules",
"TAGS" : [ "Commerce Checkout" ],
"REQUIRES" : [ "rules", "commerce_checkout" ],
"ON" : { "commerce_checkout_complete" : [] },
"IF" : [
  { "entity_has_field" : { "entity" : [ "commerce-order" ], "field" : "commerce_customer_billing" } },
  { "entity_has_field" : {
      "entity" : [ "commerce-order:commerce-customer-billing" ],
      "field" : "field_e_mail"
    }
  }
],
"DO" : [
  { "mail" : {
      "to" : "test@test.com",
      "subject" : "Order [commerce-order:order-number] at [site:name] test",
      "message" : "hello.",
      "from" : "no-reply@test.com",
      "language" : [ "commerce-order:state" ]
    }
  }
]


}
}
If you have added the e-mail field on the commerce profile type as you said, you should access is via the profile type as well. (It is not a property of the commerce order.)

Normally, the commerce profiles are already available when the commerce order is loaded. But you might not recognize them as such. Nothing indicates it it a profile.

For instance I have access to these profiles:



And then you can use a condition like this:

  { "entity_has_field" : {
      "entity" : [ "commerce-order:commerce-customer-quotation" ],
      "field" : "commerce_customer_address"
    }
  }