by eggsurplus

Control what your users can access and save time, money, and frustrations. Lock down sensitive data in SugarCRM or SuiteCRM to specific groups or teams. Supports unlimited assigned users, unlimited group assignments to records, custom layouts for each group, login/sudo capabilities and much more.

Free 30 day trial
Try it Now

By clicking you consent to share your profile with the developer

#450 - How to assign import contacts to a group?

Closed General Question created by info15 Verified Purchase 10 years ago

Hi!

We need to import thousands of contacts into SugarCRM. If I follow the import process, there is no reference to assigning them to a security group.

Could you please advise how one would do this for imported contacts? Choosing them afterwards is not really feasible, we're talking 35,000 contacts.

Thanks

  1. eggsurplus member avatar

    eggsurplus Provider Affiliate

    10 years ago

    Upon import the contacts will inherit automatically based on the parent (account) if you have "Inherit from Parent" checked in the SecuritySuite Settings page. If you have specific groups that you want to assign then your best options are to use the list view and search for the appropriate contacts that should be added to a group, Select All, then do a Mass Assign. Another option is to go directly to the database and run a SQL script. If you are comfortable with SQL the only table involved is the securitygroups_records table. You can view existing entries in there to see how to format that data. Let me know if you need more assistance if you go that route. I'm happy to help get you in the right direction.

    -Jason

    • info15 member avatar

      info15 Verified Purchase

      10 years ago

      Hi Jason, thanks a lot for the reply. So ideally the best way is a user already in the group to import the contacts? So they then are assigned the same groups, if Inherit from Parent is checked. If so then thats sounds fine.

      It is possible an Admin may import them, so this wont work. In this case I am fine with SQL, so did wonder about running as script. I am just not familiar with the ID numbering used, but a quick look online tells me I can use UUID in the insert statement instead of ID? If this is the case then thats fine.

      The Select All and Mass Assign approach I would say would not work because it would be about 35,000 users each time, and from experience we'll probably get a server 500 or something trying to load the page :)

      Thanks very much

    • eggsurplus member avatar

      eggsurplus Provider Affiliate

      10 years ago

      Sorry, I should have explained further. Inherit from Parent means that it inherits from the parent record. Many times contacts will be added to accounts. In that case the account is the parent. So if an account is associated to Group A then upon import creation a contact for that account will also get Group A.

      There are some complexities with the import process, but that is how I recall that working.

      Yes, uuid() for the id column and now() for the datetime columns.

      Good point on the server time out. You can always bump the timeout in your php.ini to avoid that. If you are good with SQL I would definitely go that route first. It'll pay off in the future as you import more data.

    • info15 member avatar

      info15 Verified Purchase

      10 years ago

      Thanks, but I still think showing 35000 users on the page will be too much to handle.

    • eggsurplus member avatar

      eggsurplus Provider Affiliate

      10 years ago

      It wouldn't show 35,000 on the page. It'll show 20, but you can select all records beyond what is on the page. The point being that it could still take a large amount of time to update all 35k records.

      Let me know how the import process goes!

    • info15 member avatar

      info15 Verified Purchase

      10 years ago

      Ahhh, that may work then. I assumed Select All would select all on the page. But yes update could take time. Thanks for your help, we shall try one/all the ways to do it!

  2. eggsurplus member avatar

    eggsurplus Provider Affiliate

    9 years ago

    Another possibility is to use Process Manager (https://www.sugaroutfitters.com/addons/process-manager-enterprise) to assign the groups automatically upon import. For example, create a hidden field on the Contacts module that contains the name of the group. Then create a workflow that checks for any newly created Contact to see if the field is set to some value. If yes then assign it to that Security Group. Here's a tutorial for how to assign a group automatically using Process Manager: https://www.sugaroutfitters.com/docs/securitysuite/process-manager-adding-groups

    -Jason

This case is public. Please leave out any sensitive information such as URLs, passwords, etc.
Saving Comment Saving Comment...
Rating
Rating
  • "Great support, works pretty well. A few glitches here and there with Easy Theme - but thats related to the theme and not the securitysuite. Would lo..." - dgreene

    Read More Reviews