Not authenticated — some data may not load
 

Customer Ownership & Assignment

Understanding how customers are owned, assigned, and transferred in Dernetz ERP

Last Updated: November 5, 2025 | Version: 1.0
Quick Summary

When you create a customer, you automatically become its owner.

  • ✅ You always see your own customers
  • ✅ Owners and Managers can see (and reassign) your customers
  • ❌ Other team members cannot see your customers

How It Works

Creating

When you create a new customer:

  1. System sets created_by field to your user ID
  2. You are now the "owner"
  3. Customer appears in your list
Automatic! No manual steps needed
Viewing

Who can see this customer:

  • You: ✅ Always visible
  • Owners: ✅ Can see it
  • Managers: ✅ Can see it
  • Other Consultants: ❌ Cannot see it
Based on your role in RBAC
Reassigning

Managers/Owners can transfer:

  1. Open customer detail
  2. Click "Reassign" button
  3. Select new owner
  4. Confirm transfer
Only Managers/Owners

Ownership Scenarios

Example: Sarah (Energy Consultant) creates "ABC Manufacturing Ltd"

User Role Can See ABC Ltd?
Sarah Energy Consultant ✅ YES (she created it)
Dionis Owner ✅ YES (sees everything)
Mike Manager ✅ YES (manages team)
John Energy Consultant ❌ NO (not his customer)

Example: Mike (Manager) reassigns "ABC Manufacturing Ltd" from Sarah to John

Before Reassignment:
  • Sarah can see ABC Ltd ✅
  • John cannot see ABC Ltd ❌
After Reassignment:
  • Sarah cannot see ABC Ltd ❌ (unless she's a Manager/Owner)
  • John can now see ABC Ltd ✅
  • ABC Ltd's created_by field now = John's ID

Example: Sarah leaves the company

Problem:

Sarah has 47 customers. If we deactivate her account, those customers are orphaned!

Solution:
  1. First: Reassign all 47 customers to other team members
  2. Then: Deactivate Sarah's account
  3. Result: No customers lost, seamless transition

How to Reassign Customers

Prerequisites
  • ✅ You must be an Owner or Manager
  • ✅ You must have access to see the customer
  • ✅ The new owner must be a valid active user
Step-by-Step Instructions
Method 1: From Customer Detail Page
  1. Open the customer you want to reassign
  2. Look for the button
  3. Click it
  4. Select the new owner from dropdown
  5. Click "Reassign Customer"
Method 2: Bulk Reassignment (Coming Soon)
  1. Go to customer list
  2. Select multiple customers (checkboxes)
  3. Click "Bulk Actions" → "Reassign"
  4. Choose new owner
  5. Confirm
Bulk reassignment feature coming in future update

Best Practices

Do's
  • ✅ Reassign customers before deactivating users
  • ✅ Balance customer load across team
  • ✅ Assign based on expertise/region
  • ✅ Document reassignment reasons
  • ✅ Notify customer of account manager changes
  • ✅ Keep ownership records up to date
Don'ts
  • ❌ Don't delete users without reassigning customers first
  • ❌ Don't reassign without team member's knowledge
  • ❌ Don't leave customers unassigned
  • ❌ Don't overload one person with all customers
  • ❌ Don't reassign mid-contract without reason

Customer Visibility Matrix

Scenario Owner Manager Consultant (Creator) Consultant (Other)
Customer created by Consultant ✓ Can See ✓ Can See ✓ Can See ✗ Cannot See
Customer created by Manager ✓ Can See ✓ Can See (if not owner-owned) ✗ Cannot See ✗ Cannot See
Customer created by Owner ✓ Can See ✗ Cannot See ✗ Cannot See ✗ Cannot See
After reassignment to you ✓ Can See ✓ Can See ✓ Can See ✗ Cannot See (unless reassigned to them)

Technical Details

For Developers

Database Field: customer.created_by

  • Type: String (Foreign Key to user.id)
  • Nullable: Yes (for backwards compatibility)
  • Index: Yes (for performance)

RBAC Filter Logic:

# Owner
if user.role == "owner":
    return True  # No filter

# Manager/Sales Director
if user.role in ["manager", "sales_director"]:
    owner_ids = [list of owner user IDs]
    return customer.created_by NOT IN owner_ids

# Everyone else
return customer.created_by == user.id

Frequently Asked Questions

A Manager or Owner must reassign your customers to another team member before you're deactivated. This ensures continuity for the customer.

Yes! Managers and Owners can see customer counts per user in the Users list (Settings → Users tab).

Yes! You can reassign customers one at a time using the Reassign button on the customer detail page.

Unassigned customers (created_by = null) are visible to Managers and Owners. They should be assigned to an appropriate team member.
Related Documentation: