Oracle Migration Tool On Demand Guide > Migrating Assignment Rule Groups and Assignment Rules > Migrating Assignment Rule Groups >

Updating or Inserting an Assignment Rule Group


This topic describes how to use the Upsert command to update an assignment rule group (if it exists) or insert an assignment rule group (if it does not exist) in your Oracle CRM On Demand environment; that is, a customer test environment or production environment. For the purposes of the Oracle Migration Tool On Demand client, this is known as an Upsert operation.

About the Upsert Operation

The Upsert command inserts or updates an assignment rule group based on the user key: <RecordType> and <RuleGroupName>.

Oracle CRM On Demand attempts to locate the rule group based on the user key. If a match is located, then the rule group is updated. If Oracle CRM On Demand cannot locate a rule group based on the user key, then a new rule group is created.

For the rules specified in the input file for the assignment rule group (if any rules are specified), the Upsert command inserts or updates the assignment rules based on either of the following user keys:

  • User key 1. <RuleGroupName> and <RecordType> and <RuleName>.
  • User key 2. <RuleGroupName> and <RecordType> and <Order>.

The <RuleName> and <Order> elements are child elements of the <AssignmentRule> element.

When you use the Upsert AssignmentRuleGroup command to update an existing rule group, Oracle CRM On Demand attempts to locate the rules that are specified in the input file based on the user keys. If a match is located, then the rule is updated. If a match is located for both user keys, then the match located for user key 1 takes precedence. If Oracle CRM On Demand cannot locate an assignment rule based on the user keys, then a new rule is created.

When you run the Upsert command, if the assignment rule group already exists, then the existing assignment rules in the rule group are updated, and new assignment rules for the rule group are inserted. Existing rules in the rule group that are not included in the input file are not affected.

Syntax

The following is the syntax for using the Oracle Migration Tool On Demand client to update an assignment rule group (if it exists) or to insert a new assignment rule group (if it does not exist):

migrationtool -u UserID -s ServerURL Upsert AssignmentRuleGroup AssignmentRuleGroupXML

where:

  • UserID is the user sign-in ID that has the appropriate privileges to run the Oracle Migration Tool On Demand client commands.
  • ServerURL is the URL for the Oracle CRM On Demand server where your company resides.
  • AssignmentRuleGroupXML is the fully qualified path name of the assignment rule group XML file, for example:

    C:\My Files\MyAssignmentRuleGroup.xml

NOTE:  The Oracle Migration Tool On Demand client requests your Oracle CRM On Demand password, which can be redirected (by using the pipe command) to the client program from standard input; that is, from a file, from the command line, or from another program.

Example of Updating or Inserting an Assignment Rule Group

The following is an example of updating an assignment rule group (if it exists) or inserting an assignment rule group (if it does not exist) in your Oracle CRM On Demand server:

migrationtool -u UserID -s ServerURL Upsert AssignmentRuleGroup "C:\Oracle Migration Tool On Demand\repository\AssignmentRuleGroup\Account\My AssignmentRuleGroup.xml"

NOTE:  Quotation marks are required only if the path or file name contains spaces.

Oracle Migration Tool On Demand Guide, Release 35 Copyright © 2017, Oracle and/or its affiliates. All rights reserved. Legal Notices.