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

Updating or Inserting an Assignment Rule


This topic describes how to use the Upsert command to update an assignment rule (if it exists) or insert an assignment rule (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 updates an assignment rule based on either of the following user keys:

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

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.

For each rule, the Upsert command inserts or updates rule criteria and team information based on the following user keys:

  • Rule criteria. The <Sequence> element, which is a child element of the <ListofRuleCriteria> element.
  • Team information. The <User> element, which is a child element of the <Team> element.

NOTE:  You must migrate the assignment rule group to which an assignment rule belongs before you migrate the assignment rule.

Syntax

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

migrationtool -u UserID -s ServerURL Upsert AssignmentRule AssignmentRuleXML

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.
  • AssignmentRuleXML is the fully qualified path name of the assignment rule XML file, for example:

    C:\My Files\My Assignment Rule.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

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

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

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

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