Discussions

Group users or customers in a company

What's the best way to group customers in a company.
Customer/user can work the same company, and it might be usefull to store this information in the shop for admin purposes or for giving discounts using rules.

Example:
- user X
- user y

both belong to company Z

Via a Rule I want to give company Z a general discount.

How do I best group these users in companies?

I was thinking to use roles but this will clutter the user profile page + you cannot add extra settings to Roles.

Another thinking was to use "Profile2" but I'm not sure if this is the right way and if you can setup "Companies" in "Profile2"

What you suggest?

Posted: Apr 17, 2013

Comments

dmguard on June 8, 2013

I would also like to know if/how this can be done. I'm only looking into using Drupal Commerce, so I don't know what you can actually do yet, but I imagine it could be possible to do it using the organic groups module.

You, as admin, could create a closed (invite only) group for a company. For each company group, you could give a representative from the company a role of "company group admin". You could give that role privileges to invite users to their group. Employees could be put into groups by you or they could be invited (by the group's admin) to join that company's group or the employee could request an invitation to join the group. Once the employee has been added to the group then any discount rules for that group will apply to their orders. This means you can have general discounts for the company and specific discounts for the employee, along with discounts based on order size, order quantity, specials, etc.

If you are able to collect company info and store it as the group's info then, when an employee makes a purchase, you could use that info for the default delivery and billing addresses. You could also have the invoice made out to the company rather than to the purchasing employee and list the employee's name as the order contact.

You may have to configure it all with care though and perhaps tweak the modules a little because, if it's not set up right, a group admin might accidentally or intentionally make the group public, allowing anyone to join the group without invite. Or, the group admin might abuse the privilege by inviting non-employees to the group. So you'd have to be careful about the privileges you give to the group admin role.

This abuse wouldn't affect me because, if Commerce does what I hope, then I intend to use it as an internal sales tool for storing customer (employee and company) info, cataloging products and product info, managing/monitoring stock levels, applying discount rules, creating quotes for customers who send in requests for quote, for following up on those quotes and, if the customer sends in a purchase order or payment, turning those quotes into actual orders and sending out invoices, receipts and delivery dockets.

In my case, if I can use Commerce to do all of this, the customers won't even know it's being used. Although, I am considering using it as an extension to our current downloadable brochures by allowing visitors to our site to view the catalog of products along with product info and specs.

rfmarcelino on June 15, 2013

I'm looking for the same feature (discount rates depending on the company) and I don't have a solution yet.
A possibility I'm considering is to use Organic Groups.
There might be a simpler solution like 'subuser' or 'profile2' bun, in my case, I want to allow company members to share images and have them available thru 'Custom line items'.

thim on September 18, 2013

Hi,

I looked into Organic groups but it was too much features and options for what I needed.
I ended up with http://drupal.org/project/group and made a custom commerce_group module of it.
Which is an implementation of the Groups module.

I created 3 groups:
- Company: to group users in 1 company
- Contracts: to link users to pricing contracts
- Discount levels: to link users to price discount percentages.

I can highly recommend the http://drupal.org/project/group even while it's still in DEV.
It's pretty stable and misses some UI screens which are work-in-progress, but I solved it by creating some extra forms and screen in my commerce_group module