How to assign users to companies
Learn all the available methods to connect users with companies to streamline your B2B data and CRM workflows.
Assigning users to companies helps to organize contacts under business accounts, making it easier to manage account-based sales, customer support, and segmentation. Whether you're working with individual profiles or large datasets, the platform gives you several flexible ways to connect users with companies: manually, automatically based on email domains, through imports, or using the API.
To know more about the users and companies, please check the liked articles first.
How to Assign Users to Companies Manually
User Profile
The simplest way to assign a user to a company is directly from their profile. This method is great for adding a user to a company during support calls or one-on-one onboarding.
Go to Data > People section and open the user's profile.
On the left find the "Company" section.
Click on the '+' icon and type the name of the existing company or create a new one.
The user will now be listed under that company’s profile as an employee.
Company Profile
It's also possible to add ew employees directly from the company profile. Use this method when updating company records and to build out the full team from the database.
Go to Data > Company section and open the company's profile.
On the left find the "Employees" section.
Click on the '+' icon and type the name or email address of the existing user.
The user will now be listed under that company’s profile as an employee.
How to Assign Users to Companies Automatically
In User.com users ca be assigned to the companies automatically on the basis of their email domain. When a new user appears in the database, the system checks if there is a company with the same same as the name of the domain from the user's email address. If yes - user will be assigned as the employee automatically. If no - a new company will be created and a user will be assigned as well. Each new user with the same email domain will be assigned to this company in the future.
To turn this option on /off:
Go to Settings > App Settings > Companies > Auto-assign users to companies section.
Find the "Enable" toggle and turn it on/off depending on the business needs.
"Exclude email domains" - this option allows to exclude some of the domains from the process. If you don't want the system to create companies like "Example" or "Test", you need write them down in the field.
NOTE! Automated user-company assignment is ON by default.
NOTE! Generic domains like "gmail.com" or "yahoo.com" are automatically excluded.
How to Assign Users to Companies via Import
Assigning users to companies in bulk via CSV file/pasting data method is perfect for migrating data or importing leads from external sources.
NOTE! To assign users this way the companies should already exist in User.com. The second obligatory condition is: every company should have "company_id" attribute. This is the main parameter, that allows the system to connect imported users with their companies.
Make sure you have the companies with the company_id values created/imported to the system.
Prepare a CSV file with the users. Remember to add the "company_id" column and put there the matching value to connect each user with the company accordingly. If you want to assign a user to several companies, use the pipe character ( "|") to separate the values.
Go to Settings > Importers > Import users section.
Upload the CSV file or paste the data to the field.
On the next step link the "company id" column with the "company id" attribute.
Import the data.
The users will now be listed as the employees under that companies' profiles and in the Companies section.
How to Assign Users to Companies via REST API
For full automation and integration with external systems, use the User.com REST API to assign users to companies. There are several endpoints that allow you to add and remove employees:
How to Assign Users to Companies via JavaScript
It's also possible to assign a user to a company directly through the script. This is particularly useful if you're identifying users at login or during account setup and want to send their company data to User.com automatically.
The data about the company can be sent along with the user details with the help of the "company" object inside the script.
Example:
<script data-cfasync="false" type="text/javascript">
window.civchat = {
apiKey: 'YOUR_API_KEY',
name: "John Doe",
user_id: "idfromyourdatabase",
email: "myemail@example.org",
gender: 2,
status: 2,
date_attr: "2017-07-25T14:14:08.612Z",
phone_number: "+44754123434",
score: 0,
company: {
name: "My Company",
company_id: "idfromyourdatabase",
revenue: "$239.9 billion"
}
};
</script>
<script data-cfasync="false" type="text/javascript" src="https://.user.com/widget.js"></script>