#433 - SOAP import assign security group
Is it possible to assign a security group while importing leads using the SOAP API? If not is it possible to assign to a security group based a specific field value?
Is it possible to assign a security group while importing leads using the SOAP API? If not is it possible to assign to a security group based a specific field value?
10 years ago
Hello Mike,
I've moved the support case over to the SecuritySuite support area.
Yes, records created via the SOAP API will inherit groups automatically based on your settings that you have configured under the SecuritySuite Settings page.
For more complex logic, such as adding/removing groups based on a field value, you can use logic hooks. See this page for help on adding a group when a field changes: https://www.sugaroutfitters.com/docs/securitysuite/developer-tips
10 years ago
Currently I am using Talend to import Contacts on a daily basis. Talend uses the SOAP API to import the records from a CSV file. Is there any way I can import the security group that they should be assigned to at the same time? For example, in the CSV file, there is already an identifier that I would like to match up to the name of a security group. So when I import the CSV file using Talend, the identifier in the CSV file will be used to automatically assign each record to the security group with the name matching the identifier in the CSV file.
10 years ago
Sugar requires a 2nd step for adding related items for things like this. So you could add another step in Talend post import (not sure if you can do post-each row in Talend, but I believe you can). In the additional step you would have Talend call the set_relationship to relate a security group to the contacts.
10 years ago
There is another option and that is to extend the SugarCRM soap api to add that logic on the Sugar side instead. This is a bit intensive, but may be worth it depending on your needs/frequency.
10 years ago
Is there away to create a php script that runs using a cron job that will query to see the value of a specific field and if its value matches a security group name, then automatically assign that record to the security group? I'm willing to pay for development if possible.
10 years ago
Yes, you can add/remove groups via PHP scripts. Here is one example of doing that in a logic hook. There are resources out there for how to create a scheduler job in SugarCRM. Combine that with this logic and you should be able to do it: https://www.sugaroutfitters.com/docs/securitysuite/developer-tips#fieldchange
10 years ago
So is it possible to update the security groups using Process Manager as you mentioned in the comments on the developer tips link? Or is this something that really should be done using logic hooks?
10 years ago
I'm waiting for confirmation of the new version being released, but I just go word at the end of last week that Process Manager's latest release will allow you to set Security Groups within their workflows. I'll follow up here when I hear that it has been uploaded and released.
10 years ago
Just got confirmation that Process Manager has just released a new version that allows you to assign security groups during a workflow.
10 years ago
Here is a tutorial on how to add teams to a record using Process Manager: https://www.sugaroutfitters.com/docs/securitysuite/process-manager-adding-groups
-Jason