30 Importing and Exporting Pricing and Setup Components
Learn how to import and export pricing and setup components in Oracle Communications Billing and Revenue Management (BRM) by using the ImportExportPricing utility.
Topics in this document:
Note:
You can also use the PDC UI to import and export pricing and setup components. For more information, see "Exporting and Importing Changesets" in PDC Online Help.
About Using the XML Pricing Interface to Create Product Offerings
You can create and modify product offerings in an XML file and then use the ImportExportPricing command-line utility or the PDC UI to do the following:
-
Import all or some product offerings configured in an XML file into the PDC database.
The utility creates any new pricing and setup components and modifies any changed components in the PDC database.
-
Export all or some product offerings from the PDC database into an XML file for editing.
If you export the data into an existing XML file, the utility overwrites the entire XML file.
You can also use XML files to move product offerings from one PDC database to another PDC database.
To create or modify product offerings in an XML file, you use a text editor or an XML editor. You define the pricing and setup components that you want to create by adding XML tags to the file. See "PDC XML Tags" for information about the required and optional XML tags. You can add the XML tags to:
-
One consolidated XML file containing all of the pricing or setup components
-
Separate XML files for each type of pricing or setup component
For information about the PDC XML tags that you use to create pricing and setup components, see "PDC XML Tags".
The XML files that you create must conform to the format detailed in the XSD files for pricing or setup components. See "About the XSD Files" for more information.
Some pricing components have dependencies on other pricing and setup components. Before loading such pricing components, ensure that the prerequisite data is available in the PDC database. See Table 30-1 for more information.
If you create XML files for specific pricing or setup components, you must load the XML files in the order based on the dependencies. See "About Dependencies between Pricing and Setup Components" for more information.
About the ImportExportPricing Utility
The ImportExportPricing utility is a command-line interface for importing pricing and setup components to and for exporting pricing and setup components from the PDC database by using XML files.
ImportExportPricing is a role-based utility that authenticates and authorizes users based on their role. A user's role determines what tasks they can perform and what information they can see.
Users of this utility can have the following roles:
-
Pricing Design Admin: Users with this role can import and export all pricing and setup components.
-
Pricing Reviewer: Users with this role can only export all pricing and setup components.
-
Pricing Analyst: Users with this role can import only pricing components and cannot import setup components and profile data. Users can export all pricing and setup components.
ImportExportPricing allows you to filter the data that you want to import to or export from PDC. For example, you can export all pricing and setup components from PDC or specify specific pricing and setup components to export.
You can use ImportExportPricing to:
-
Export pricing and setup components from the PDC database to an XML file. See "Exporting Pricing and Setup Components from PDC" for more information.
-
Import pricing and setup components defined in an XML file into the PDC database. See "Importing Pricing and Setup Components" for more information.
-
List pricing or setup components available in the PDC database. See "Listing Pricing or Setup Components" for more information.
-
Delete setup components from the PDC database if it is not prerequisite data for any other component. See "Deleting Setup Components" for more information.
About Dependencies between Pricing and Setup Components
Before importing a pricing component, you must import the setup components that the pricing component references. You must ensure that the setup components referenced by the pricing components are either in the XML file or are already imported into PDC.
For example, to import a charge, you must ensure that the balance elements that it references already exist in PDC.
This section assumes that the following prerequisite data is already available in PDC:
- Service
- Event
- Account Attributes
- Service-Event Map
- Profiles
Table 30-1 lists the prerequisites for importing the pricing components into PDC. Some of the prerequisites are optional depending on your business functions.
Table 30-1 Prerequisite Data for Importing Pricing Components
Pricing Component | Prerequisite Pricing Component | Prerequisite Setup Component |
---|---|---|
Discount Filter |
None |
None |
Time Model |
None |
None |
APN Selector |
None |
Impact Categories and Zone Models |
Pricing |
None |
RUMs, Balance Elements, G/L IDs, and Tax Codes |
USC Selector |
None |
Impact Categories and Zone Models |
Tax Selector |
None |
Tax Codes |
Tax Exemption Selector |
None |
Tax Exemption Codes |
Discount Trigger |
None |
Balance Elements |
Generic Selector |
None |
Custom Rules and Profile Attribute Specification |
Price Selector |
Pricing |
None |
Charge |
Time Models, Pricing, USC Selectors, APN Selectors, and Price Selectors |
RUMs, Balance Elements, Tax Codes, G/L IDs, and Zone Models |
Charge Selector |
Charges |
Value Maps and Zone Models |
Charge Offer |
Charge Selectors and Charges |
RUMs, Deliverables, Tax Codes, Tax Suppliers, Provisioning Tags, and Extended Attribute Templates |
Discount |
Pricing, Discount Trigger, and Discount Filter |
Balance Elements, Tax Codes, and G/L IDs |
Discount Selector |
Discounts |
None |
Discount Offer |
Discount Selectors and Discounts |
Provisioning Tags and Extended Attribute Templates |
Discount Offer Exclusion |
Discount Offer |
None |
Bundle |
Charge Offers, Discount Offers, and Subscription Terms |
Extended Attribute Templates |
Bundle Dependency |
Bundles |
None |
Bundle Transition |
Bundles |
None |
Package |
Bundles and Subscription Terms |
Balance Elements and Extended Attribute Templates |
Package Discount Restriction |
Bundles |
None |
Package List |
Packages |
None |
Package Transition |
Packages |
None |
Subscription Terms |
None |
G/L IDs and Balance Elements |
Subscription Terms Auto Renew |
Subscription Terms |
None |
Chargeshare |
Pricing, Trigger, Filter, and Charge Selector Spec |
Balance Elements, Tax Codes, and G/L IDs |
Chargeshare Offer |
Distribution Charge |
Extended Attribute Templates |
About the XSD Files
ImportExportPricing uses separate XSD files for importing or exporting pricing components, setup components, and profile data. The XSD files are available in their respective directories in the PDC_home/apps/xsd directory, where PDC_home is the directory in which the PDC software is installed. The XSD files describe the structure of the XML document. The XML file you create must comply with the structure defined in the XSD.
The XSD defines the following items for an XML file:
-
The elements and attributes, their data types, and the default and fixed values for the elements and attributes.
-
Elements that are child elements, and the number and order of the child elements.
-
If an element can be empty or can include text.
Prerequisites for Using the ImportExportPricing Utility
To use ImportExportPricing, you must:
-
Ensure that the XML files used by this utility conform to the format detailed in the corresponding XSD files. See "About the XSD Files" for more information.
-
Ensure PDC_home/apps/bin is in your PATH environment variable.
Exporting Pricing and Setup Components from PDC
Exporting by using ImportExportPricing involves extracting the pricing and setup components from the PDC database into XML files.
Before exporting pricing or setup components, consider the following:
-
You can export all or a subset of pricing and setup components.
-
When exporting pricing components, the utility does not export the setup component referenced by pricing components. You must export the setup components explicitly.
ImportExportPricing enables you to export the following from a PDC database to an XML file:
-
All pricing and setup components. See "Exporting All Pricing and Setup Components" for more information.
-
A subset of pricing and setup components. See "Exporting a Subset of Pricing and Setup Components" for more information.
Exporting All Pricing and Setup Components
To export all pricing and setup components to XML files, enter the following command:
ImportExportPricing -export [Prefix] -appsvruser ApplicationServerUserName -pdcuser PdcUserName
See "ImportExportPricing" for a description of the parameters used in this command.
For example, the following command exports all pricing components, setup components, and profile data in the PDC database in a Linux environment to the MyData_export_pricing.xml, MyData_export_config.xml, and MyData_export_profile.xml files, respectively:
ImportExportPricing -export MyData -appsvruser weblogic -pdcuser pdcuser
Exporting a Subset of Pricing and Setup Components
You can export specific pricing and setup components based on the object type, modification time, and the user who modified the data. You can also filter the exported data based on the object name.
For example commands for exporting a subset of data, see the following:
- Example 1: Exporting a Subset of Pricing Components
- Example 2: Exporting Only Setup Components Managed in BRM
- Example 3: Exporting Only G/L IDs
- Example 4: Exporting All Pricing Reference Objects
- Example 5: Exporting Only Metadata Objects
- Example 6: Exporting Setup Components Modified After a Specific Time
- Example 7: Exporting Pricing Components Modified by Specific Users
- Example 8: Exporting Only Extended Attribute Template Objects
Example 1: Exporting a Subset of Pricing Components
The following example exports discount and charge pricing components from the PDC database to the MyPricingComponents_export_pricing.xml file:
ImportExportPricing -export MyPricingComponents -pricing ALTERATION_RATE_PLAN,CHARGE_RATE_PLAN -appsvruser weblogic -pdcuser pdcuser
Example 2: Exporting Only Setup Components Managed in BRM
The following example exports all BRM-managed setup components from the PDC database into the MySetupComponents_export_config.xml file:
ImportExportPricing -export MySetupComponents -brmObject
Example 3: Exporting Only G/L IDs
The following example exports G/L IDs into the GL_IDs_export_config.xml file:
ImportExportPricing -export GL_IDs -brmobject GLID
Example 4: Exporting All Pricing Reference Objects
The following example exports the ChargeOffer-RealtimeUsage and ChargeOffer-Batch reference objects, including the corresponding metadata and setup components, from the PDC database to the MyChargeOffers_export_pricing.xml, MyChargeOffers_export_metadata.xml, and MyChargeOffers_export_config.xml files:
ImportExportPricing -export MyChargeOffers -pricing CHARGE_OFFERING -name "ChargeOffer-RealtimeUsage,ChargeOffer-Batch" -expAllRefs
Example 5: Exporting Only Metadata Objects
The following example exports all event, service, account, and profile attribute specifications from the PDC database in a Linux environment to the MySetupComponents_export_meta_config.xml file:
ImportExportPricing -export MySetupComponents -metadata
Example 6: Exporting Setup Components Modified After a Specific Time
The following example exports all setup components modified after 2010-01-05T19:05:09GMT+05:30 from the PDC database in a Linux environment to the MySetupComponents_export_config.xml file:
ImportExportPricing -export MySetupComponents -config -ma 2010-01-05T19:05:09GMT+05:30 -appsvruser weblogic -pdcuser pdcuser
Example 7: Exporting Pricing Components Modified by Specific Users
The following example exports pricing components modified by User1 and User2 from the PDC database in a Linux environment to the MyPricingComponents_export_pricing.xml file:
ImportExportPricing -export MyPricingComponents -pricing -mby User1, User2 -appsvruser weblogic -pdcuser pdcuser
Example 8: Exporting Only Extended Attribute Template Objects
The following example exports all ProductSpecCharacteristicTemplate objects, which define the extended attributes available to pricing components, from the PDC database in a Linux environment to the MyExtendedAttributes_export_config.xml file:
ImportExportPricing -export MyExtendedAttributes -config PSCTEMPLATE
Exporting Promoted and Failed Components
By default, ImportExportPricing exports only successfully promoted and transformed objects. Running the ImportExportPricing utility with the inclFailedObjs parameter exports the most currently promoted components in addition to the failed components.
To export only successfully promoted and transformed pricing components, run the following command:
ImportExportPricing -export –pricing -inclFailedObjs -appsvruser ApplicationServerUserName -pdcuser PdcUserName
Exporting Only Obsoleted Components
You can export only obsoleted versions of pricing and setup components. For example, the following command exports all obsoleted pricing components (including metadata and setup components) from PDC in a Linux environment to the MyPricingObsoleteComponents_export_pricing.xml file:
ImportExportPricing -export MyPricingObsoleteComponents -pricing -expObsolete -appsvruser weblogic -pdcuser pdcuser
About Supported Pricing and Setup Components
Table 30-2 lists the type of pricing components you can import to or export from PDC using the ImportExportPricing utility.
Table 30-2 Supported Pricing Components and Their Representation in the Command Line and XML File
Pricing Component Type | Represented in the Command Line and XML File As ... |
---|---|
Charge | CHARGE_RATE_PLAN |
Discount | ALTERATION_RATE_PLAN |
Chargeshare | DISTRIBUTION_RATE_PLAN |
Rollover | ROLLOVER_RATE_PLAN |
Discount Selector | ALTERATION_RATE_PLAN_SELECTOR |
Generic Selector | GENERIC_SELECTOR |
Charge Selector | CHARGE_RATE_PLAN_SELECTOR |
Price Selector | PRICE_MODEL_SELECTOR |
APN Selector | APN_MAP |
USC Selector | USC_MAP |
Tax Selector |
TAX_SELECTOR |
Tax Exemption Selector |
TAX_EXEMPTION_SELECTOR |
Time Model | TIME_MODEL |
Trigger | TRIGGER_SPEC |
Filter | CHARGE_SELECTOR_SPEC |
Discount Pricing | ALTERATION_POP_MODEL |
Rollover Rules | ROLLOVER_POP_MODEL |
Recurring Pricing | RECURRING_POP_MODEL |
One-Time Pricing | ONE_TIME_POP_MODEL |
Charge Offer | CHARGE_OFFERING |
Discount Offer | ALTERATION_OFFERING |
Chargeshare Offer | DISTRIBUTION_OFFERING |
Discount Exclusion | ALTERATION_EXCLUSION |
Subscription Terms | SUBSCRIPTION_TERMS |
Subscription Terms Auto Renew | SUBSCRIPTION_TERMS_AUTO_RENEW |
Bundle | BUNDLED_PRODUCT_OFFERING |
Bundle Transition | BUNDLE_TRANSITION |
Bundle Dependency | BUNDLE_DEPENDENCY |
Package | PACKAGE_OBJ |
Discount Restriction | PACKAGE_EXCLUSION |
Package Transition | PACKAGE_TRANSITION |
Package List | PACKAGE_LIST |
Table 30-3 lists the type of setup components you can import to or export from PDC using ImportExportPricing.
Table 30-3 Supported Setup Components and their Representation in the Command Line and XML File
Setup Component Type | Represented in the Command Line and XML File As ... |
---|---|
Value Map | VALUE_MAP |
Event | EVENT_ATTRIBUTE_SPEC |
Service | PRODUCT_ATTRIBUTE_SPEC |
Account Attribute | CUSTOMER_ATTRIBUTE_SPEC |
RUM | RUM_CONFIGURATION |
Impact Category for Zones | ZONE_RESULT_CONFIGURATION |
Service-Event Map | ATTRIBUTE_SPEC_MAP |
Balance Element | BALANCE_ELEMENT |
Deliverable | DELIVERABLE |
G/L ID | GLID |
Tax Code | TAX_CODE |
Tax Exemption Code | TAX_EXEMPTION_CODE |
Tax Supplier | TAX_SUPPLIER |
Geographical Zone Model | GEO_ZONE_MODEL |
Standard Zone Model | STANDARD_ZONE_MODEL |
Provisioning Tag | PROVISIONING_TAG |
Special Day Calendar | HOLIDAY_CALENDAR |
Custom Rule | CUSTOM_ANALYZER_RULE |
Profile Attribute Specification | PROFILE_ATTRIBUTE_SPEC |
Extended Attribute Template | PSCTEMPLATE |
Importing Pricing and Setup Components
Importing pricing and setup components using the ImportExportPricing utility involves retrieving data from one or more XML files and loading them into the PDC database. Your XML files must conform to the format detailed in the XSD files for pricing or setup components. See "About the XSD Files" for more information.
Before importing pricing and setup components, consider the following:
-
If you import pricing and setup components together, the utility imports setup components before importing the pricing components. If setup components are not imported successfully, the utility does not import the pricing components. When importing data, you must include the -metadata, -config, -pricing, -profile, or -customfields parameter at the command.
-
During import, the utility modifies the objects in the database:
-
If the -ow parameter is used and the objects already exist in the database, the utility overwrites the existing objects. The utility generates an error if the -ow parameter is not used and the objects already exist in the database.
-
If the object does not exist in the database, the utility creates the object, regardless of the usage of the -ow parameter.
-
If the -ignoreID parameter is used, the utility ignores the internal IDs in the XML files. The utility looks up the internal IDs by object name or generates internal IDs for new objects. Use this option to avoid conflicts when importing data from another environment.
Use this parameter with the -ow parameter when importing existing data.
-
Note:
-
Importing charge selectors by ID may result in exceptions when attempting to view them. To address this issue, use names for referencing data between objects.
-
If you encounter a ModelData failure while importing a Charge Selector or Generic Selector, remove all <modelData> entries from the XML file and re-import the data.
If the PDC UI displays "*" instead of the expected value in any rules within the Charge Selector or Generic Selector, export the selector, eliminate all <modelData> instances from the XML file, and re-import the data.
For the list and description of parameters to use with ImportExportPricing for importing components into PDC, see "Import Mode".
You can import pricing and setup components from a single XML file or from a directory containing multiple XML files.
Importing from a Single XML File
You can import data from a single XML file that contains your pricing and setup components.
For example, to import metadata objects from an XML file into the PDC database, run the following command:
ImportExportPricing -import -metadata FileName
where FileName is the file name and path to your import XML file.
The ImportExportPricing utility imports the data from the XML file into the PDC database and commits the data. If there is an error, all data imported before the error occurred is persisted in the database.
Importing Multiple XML Files from a Directory
The ImportExportPricing utility can import pricing and setup components from multiple XML files located in a directory.
Note:
The XML files in the directory must contain only one type of configuration object: only metadata objects, only setup components, or only pricing components.To import data from multiple XML files in a directory:
-
Create your import XML files. Ensure the files contain only one type of configuration object, such as only pricing components, only setup components, or only metadata objects.
-
(Optional) Create an import_order.cfg file listing the order in which to import the XML files. For example, you could specify to import chargeRatePlans.xml before chargeOffers.xml.
Note:
-
Ensure import_order.cfg does not contain empty lines.
-
Without the file, ImportExportPricing imports your XML files in a random order.
-
-
Copy your import XML files and import_order.cfg file to your input directory. Your input directory can include one or more subdirectories, but the import_order.cfg file must be at the top level of your input directory.
-
Set the ownership and permissions of the input directory, its subdirectories, your import XML files, and import_order.cfg file to the PDC installation user and chmod 755.
-
Run the ImportExportPricing utility in import mode. For example, to import pricing setup components from multiple XML files in a directory into the PDC database:
ImportExportPricing -import -config DirectoryName
where DirectoryName is a directory present in the current location. The input path can be an absolute or relative directory location.
The ImportExportPricing utility imports the data from your XML files into the PDC database and commits the data. If there is an error, all data imported before the error occurred is persisted in the database.
Listing Pricing or Setup Components
You can use the ImportExportPricing utility to display components available in the PDC database. For the list and description of parameters to use, see "Type Mode".
The following example command displays the metadata components available in the PDC database:
ImportExportPricing -type metadata
Publishing Setup Components
You can use the ImportExportPricing utility with the -publish and -target parameters to publish components from PDC to the specified target engines, such as the batch rating engine, real-time rating engine, or ECE. For the list and description of parameters to use for publishing components, see "Publish Mode".
The following example command publishes all setup components from PDC to ECE:
ImportExportPricing -publish config -target ece
Deleting Setup Components
You can use the ImportExportPricing utility with the -delete parameter to delete setup components from the PDC database. See "Delete Mode" for a description of parameters used in this command.
For example, the following command deletes the setup components defined in the /Temp/ComponentsToDelete.xml file from the PDC database:
ImportExportPricing -delete /Temp/ComponentsToDelete.xml
Deleting Pricing Profiles
You can also use the ImportExportPricing utility to delete pricing profiles if they are not being used by any pricing component. For example, the following command deletes the pricing profile data defined in the /Temp/ProfilesToDelete.xml file from the PDC database:
ImportExportPricing -delete /Temp/ProfilesToDelete.xml
Keeping Only the Latest Versions of Successfully Promoted PDC Components
You can keep only the latest versions of successfully promoted PDC components and delete all older versions in PDC or in the associated target engines and by using the -keep parameter. For the list and description of parameters to use for deleting older versions of PDC components, see "Keep Mode".
For example, the following command keeps the last three successfully promoted versions of pricing components in the PDC database and deletes all older versions of the pricing components:
ImportExportPricing -keep pricing -numVersion 3
Note:
PDC keeps versions of the successfully promoted components if they are available in the PDC database. For example, if you want to keep the latest two versions of successfully promoted components and there is only one version available in the PDC database, PDC keeps only that one version.
Obsoleting PDC Components
You can use the ImportExportPricing utility to obsolete PDC components with a Promoted status if they are not referenced by any other pricing components.
To obsolete PDC components:
-
Export the PDC component that you want to obsolete into an XML file. See "Exporting Pricing and Setup Components from PDC" for more information.
-
In the XML file, set the <obsolete> element for the PDC component to true:
<obsolete>true</obsolete>
-
Import the PDC component into the PDC database with the -ow parameter. See "Importing Pricing and Setup Components" for more information.
For example:
ImportExportPricing -import -pricing export_pricing.xml -ow
The imported PDC component is obsoleted.
Note:
If you want to reuse an obsoleted PDC component, set the <obsolete> element for that component to false and import it into the PDC database.