I need to invoice new users via email, and when the payment has been received activate the user. I have been thinking about creating an order in Commerce, invoicing this with Commerce Billy, but have so far not been able to update the customer profile with the user details via Rules (triggered by creation of a new user, creating an order but the order lacks a customer profile, and it seems impossible to add a new profile to an order) . Is there perhaps a simpler way to do this?

Trigger: After saving a new user account


Add a product to the cart (the product represents membership) Complete checkout for an order - for the cart/order Update the order state -> Completed

This parts works well and creates an order owned by the new user account.

Another rule picks up:

Trigger : Completing the checkout process

Conditions: Entity is of type = Commerce Order Entity has field = commerce_customer_billing

Actions: Create a new entity = Commerce Customer profile Set a data value = set a custom field to value X Save entity = Commerce Customer profile

In this last step I miss an action that would connect the Customer Profile and Order somehow.



  • can you show the triggers, conditions and actions you are using to accomplish this? – Geoff Feb 23 '15 at 3:58
  • I think you can select an php code option in actions and update the user profile with values in order details. // load user object $existingUser = user_load('USERID'); // create an array of properties to update $edit = array( 'profile_first_name' => 'Eric' ); // save existing user user_save( (object) array('uid' => $existingUser->uid), $edit, 'Personal Information' // category ); – harsh_behl_0007 Feb 25 '15 at 7:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.