Import Access Group Rules
There are two types of access group rules: object sharing rules that provide users with access to object records, and access group membership rules which add and remove users as access group members. You can import both types of rules.
You can use import management to create, update, or delete access group membership rules and custom object sharing rules, but you can only make limited updates to the predefined object sharing rules. Here are the changes you can make to the predefined rules during import:
-
You can activate or inactivate a predefined rule and enable or disable a predefined group for a predefined rule.
-
You can add a predefined or custom access group to a predefined rule or remove groups you added previously.
-
You can change the access levels for groups you add to a predefined rule.
There are three access group rule objects: Access Group Rule, Access Group Rule Condition, and Access Group Rule Candidate. To import data for each object, create a separate CSV file containing the data you want to import. You must import rules first, and then any rule conditions and rule candidates you want to assign to the rule.
Before you begin, you need to understand how your source data maps to the target object attributes in your application. You also must identify the target object attributes your CSV import file to include.
Review Required Attributes and Validations for Access Group Rule Objects
The tables in this section list the attributes that are required when importing rules, rule conditions, and rule candidates. Some attributes are required to uniquely identify the object record, some are conditionally required depending on whether you want to create, update, or delete an object record, and some are optional. Make sure that you provide valid values for these attributes so that they pass import validations built into the application.
This table lists the required attributes for importing access group rule data:
Attribute |
Description |
Import Validations |
Creating a Rule |
Updating an Existing Rule |
Deleting an Existing Rule |
---|---|---|---|---|---|
RuleName |
Display name of the rule. |
Not applicable. |
Required |
Optional |
Optional |
Object |
The name of the object the rule is created for. |
A valid object must exist. |
Required |
Optional |
Optional |
RuleNumber |
The number of the rule. If you don't provide the rule number, it's automatically generated. |
Not applicable. |
Optional |
Required |
Required |
RuleID |
The internal number assigned to the rule. |
Not applicable. |
Don't provide. |
Don't provide. |
Don't provide. |
Active |
A value to indicate whether or not the rule is active. A value of Y indicates the rule is active by default. |
Not applicable. |
Optional. |
Optional |
Optional |
PredefinedFlag |
A value that indicates whether the rule is a predefined or custom rule. The default value is N. |
Not applicable. |
Don't provide. |
Don't provide. |
Don't provide. |
Description |
The rule description. |
Not applicable. |
Optional |
Optional |
Optional |
MatchingType |
The matching type for the rule conditions. Valid values are OR or AND. The default value is AND. |
Not applicable. |
Optional. |
Optional |
Optional |
ConditionCode |
The condition code for predefined hybrid rules. |
Not applicable. |
Optional |
Optional |
Optional |
ConditionName |
The condition name for predefined hybrid rules. |
Not applicable. |
Optional |
Optional |
Optional |
This table lists the required attributes for importing access group rule candidate data.
Attribute |
Description |
Import Validations |
Creating a Rule Candidate |
Updating an Existing Rule Candidate |
Deleting an Existing Rule Candidate |
---|---|---|---|---|---|
AccessGroupNumber |
The number of the access group associated with a rule. |
A valid access group number must exist. |
Required |
Required |
Required |
RuleNumber |
The number of the rule the access group is associated with. |
A valid rule number must exist. |
Required |
Required |
Required |
RuleCandidateNumber |
An internal number automatically generated. |
Not applicable. |
Don't provide. |
Don't provide. |
Don't provide. |
RuleCandidateId |
An internal identifier automatically generated. |
Not applicable. |
Don't provide. |
Don't provide. |
Don't provide. |
AccessLevel |
The access level assigned to the access group associated with the rule. The default value is Read. |
Valid values are Read, Delete, Update, Full. |
Optional |
Optional |
Optional |
EnableFlag |
A value that indicates whether or not the access group is enabled for the rule. |
Valid values are N or Y. |
Optional |
Optional |
Optional |
This table lists the required attributes for importing access group rule condition data.
Attribute |
Description |
Import Validations |
Creating a Rule Condition |
Updating an Existing Rule Condition |
Deleting an Existing Rule Condition |
---|---|---|---|---|---|
RuleConditionId |
The rule condition identifier. |
If a value isn't specified for new rule conditions, it's automatically generated. For update and delete operations, this attribute is required. |
Optional |
Required |
Required |
Object |
The object the rule condition is created for. |
A valid object must exist. |
Required |
Required |
Required |
ObjectAttributeCode |
The attribute the rule condition is created for. |
A valid attribute code must exist for the selected object. |
Required |
Required |
Required |
Operator |
The operator defined for the attribute. The operators IN and NOT IN aren't supported when updating rule conditions. Instead, delete the existing condition record and create a new one. |
A valid operator for the attribute and object combination must be specified. |
Required |
Required |
Required |
RuleNumber |
The number of the rule the condition is defined for. |
A valid rule number must exist. |
Required |
Required |
Required |
RuleConditionNumber |
The number of the rule condition. |
This value is automatically generated if not specified for create condition operations. |
Optional |
Required |
Required |
ObjectAttributeName |
The display name of the object attribute in the rule condition. If a value is specified for the ObjectAttributeCode attribute, this value is optional. |
A valid attribute name must be specified. |
Optional |
Optional |
Optional |
Value |
The value specified for the condition, if applicable. |
If the value is selected from a predefined list of values, the value must be valid. |
Optional |
Optional |
Optional |
Create the Source CSV File
You include the data that you want to import into your application in a source CSV file. Create a separate CSV file for the access group rules, rule conditions, or rule candidates you want to import. You can use the templates available in the Import Objects UI page to create the source CSV file. To download a template:
-
Go to
. -
Select either the Access Group Rule, the Access Group Rule Candidate, or Access Group Rule Condition object in the Import Object Details table and click Download.
You can now edit the downloaded file and provide valid values for the required attributes.
Create the Import Activity
Once you have the CSV file ready, create an import activity to import the rule information:
-
Navigate to the Manage Imports page (
). -
Click Create Import Activity.
-
In the Enter Import Options page, provide values for these fields:
Field
Description
Name
The name you want to assign to the import.
Object
From the Object drop-down list, select Access Group Rule, or Access Group Rule Condition or Access Group Rule Candidate depending on the object records you're importing.
Import access group rules first, then import the conditions defined for the rule or the rule candidates, if applicable.
File Name
Select the CSV file you previously created for the rule import data.
-
If you're importing records for the Access Group Rule object, you can also import records for the child objects, Access Group Rule Candidate or Access Group Rule Condition, at the same time using these steps:
-
Click the Import Object Hierarchy link. Now you can see the object hierarchy for Access Group Rule.
-
Select the Enabled check box for the child objects you want to import.
-
Select the CSV file for each of these child objects.
-
-
Click Next.
- On the Map Fields page, you'll see that the source and target attributes are automatically mapped. Review and edit the mappings if required.
-
Check the file for unmapped columns or data format issues by clicking Validate Data. Click Next.
-
On the Review and Submit page, review the import details and then click Submit when you're ready.
Review the Import Results
Use the Manage Imports page to check whether your import succeeded. The Manage Imports page shows the status of all active, completed, and unsuccessful imports.
-
Navigate to the Manage Imports page:
.-
Click the All Imports infotile and search for the import activity that you created earlier.
-
Check the Status column for the import activity. The import is successful if the status displays as Completed. You can drill down on the import activity to go to the Import Status page, which provides the status details of the import activity.
-
-
After the import process completes successfully, navigate to the Object Sharing Rules page:
. -
Publish the rule changes by selecting Publish Rules from the Actions menu.
-
Run the Perform Object Sharing Rule Assignment Processing scheduled process to ensure that the access group sharing rules for each object are assigned properly.
-
Verify the changes to your access group rules and their associated conditions and candidates on the Object Sharing Rules page.