The importBusinessObjects command imports one or more of the specified business objects described by the specified XML file into the target sphere. Currently, the only business object defined is the consumer business object, which is the means used to segment transaction information by consumer.

By default, this command replaces all existing objects that are older than the imported objects. You might use this command to migrate data from one environment to another or to populate your environment with a set of consumers.

You provide the data to import using the -inputFile argument or standard input. The objects you import must have first been exported using the exportBusinessObjects command.

If you are using this command to populate your environment with a set of consumers, the trickiest part is to create a valid input file. Here's a way to do this without having to guess at how to format your input file properly:

  1. If needed, customize the business object by adding custom attributes.

  2. Use the management console to create a consumer.

  3. Use the exportBusinessObject command, specifying the name of an output file. Data about the consumer you created in Step 2 will be exported to an XML file.

  4. Examine the output XML file. Using the format shown in the file, expand the file to add more consumers.

    See About Consumers, for information on working with consumers.

Command Syntax

btmcli importBusinessObjects [-i inputFile]                    [-replace ALL | all | NEWER | newer | NONE | cleaned | CLEANED]
                   [-v] -s sphereUrl -l username:password
Name Long Name Description
-i -inputFile The name of the file containing the data to be imported.

The input file must contain at least one business object to import.

-replace -replacementLevel Determines the outcome when an imported object matches an existing object in the system:

ALL: replace all existing objects

NEWER: replace existing objects that are older than imported objects. (Default)

CLEANED: remove all existing business objects and then import the new business objects.

NONE: do not replace any existing objects.

-v -verbose Display more detailed information about command execution.
-s -sphereUrl The URL of the sphere. http://hostname:port/btmcentral/sphere/

This flag is not required if you have set the AP_SPHERE_URL environment variable for your sphere.

-l -userLogin The username and password associated with the sphere, in the format: username:password. This set of credentials must belong to a user in the btmadmin role.

See Security Options in Accessing CLI Commands for information on furnishing login credentials.

You can encrypt passwords using the encryptPassword command.


The following example shows the importBusinessObject command used to import data from the file MyConsumers.

btmcli importBusinessObject -inputFile MyConsumers -replace ALL
                        -s http://localhost:8080/btmcentral/sphere/
                        -l admin:abracadabra