This chapter shows how to use Oracle Communications Billing and Revenue Management (BRM) to set up rates based on date and time.
Before you read this chapter you should be familiar with rating and price lists. See "About Creating a Price List".
As explained in "About Creating a Price List", BRM rates billable events by capturing data about the event, for example, the date and time that the event occurred. Since BRM is aware of the date and time of the event, the rating opcodes can use the date and time to determine how to rate the event.
You can specify when rates are valid in the following ways:
In products. You can specify when a product is valid, including all the rates it contains. See "Restricting When a Product Is Available".
In rate tiers. You can use rate tiers to specify a set of rates, each based on a specific time or day. See "Using Rate Tiers to Set Up Rating Based on Date and Time".
When you create rates based on date and time, you can specify how to recognize the time that the event occurred, for example, at the start of the event, the end, or the entire duration.
You specify a time-of-day mode to indicate when a rate should be applied either relative to an event's start time, its end time, or the difference between the two. This is especially useful when an event overlaps a time boundary where a rate changes.
For example, 12 a.m. Monday might be the boundary between a special weekend fee and a regular weekday fee:
To apply the special weekend fee to the entire event, specify Start time.
To apply the regular weekday fee to the entire event, specify End time.
To apply the weekend fee to the portion of the event before midnight and the weekday fee after midnight, specify Timed.
Note:Midnight is shown as 00.00.00.
You use rate tiers to set up valid dates and times for rates. Figure 14-1 shows a rate tier that includes two different rates:
You can include multiple rate tiers in a rate plan. Figure 14-2 shows a rate plan with three rate tiers, each valid for a different set of dates:
As you create rate tiers, they appear on a list. BRM applies rates from the top of the list down. You can change the order in which rate tiers are applied by changing their places in the list shown in Figure 14-3.
For example, at the top of the rate tier list you could insert a promotional rate tier valid only until the end of May, 20031. BRM applies that rate only until May 31, 2003. After that, the promotional rate tier is no longer valid, and BRM no longer applies it.
You specify how long a rate tier is valid by specifying a duration. You can specify that a rate tier is always valid or is valid for either an absolute or a relative date range. Figure 14-4 shows three rates with validity specified by date.
For example, your basic IP Fax rate tier should not change and always applies. You could specify an absolute date range of 12/1/01 through 12/31/01 for a promotional holiday rate tier. You could also specify a relative date range of 30 days from purchase until 60 days from purchase to give your customers special rates during the second month.
You specify when a rate tier is valid by selecting ranges of dates, day(s) of the week, and time(s) of day. For example:
For each rate tier, you specify a valid date range. For example, you can specify that a rate tier is valid for the entire year 2001.
For each date range, you specify one or more valid day-of-the-week ranges. For example, you can specify that a rate tier is valid Monday through Friday.
For each day-of-the-week range, you specify one or more valid time-of-day ranges. For example, you can specify that a rate tier is valid between 6 a.m. and 8 p.m.
Date ranges consist of a start date and an end date between which a rate tier is valid. For example, a promotional rate tier for usage fees is valid only for the month of January.
Day ranges consist of a list of days during which a rate is valid. For example, a rate tier for off-peak IP usage fees is valid only on weekends.
Time of day ranges consist of a start time and an end time between which a rate tier is valid. For example, an after-hours rate tier for IP usage fees is valid only between 10 p.m. and 6 a.m.
Within each date range, you can use multiple day ranges and within each day range you can use multiple time-of-day ranges.
The following examples show how you can use date, day, and time-of-day ranges together. Figure 14-5 shows some time ranges that specify free IP usage for the first month after an account is created. Figure 14-6 shows some time ranges that specify IP usage rates effective after the first month.
Because BRM uses the time and date of an event to determine how to rate the event, it is important to use the correct time zone during rating. You specify whether real-time rating should use the event time zone or the server time zone to rate the event. By using time zone data, BRM can correctly calculate event start and end times before rating occurs.
When you create a product with Pricing Center, you specify whether the event or server time zone should be used for rating. By default, Pricing Center uses the event time zone.
The event time zone is the time zone where the application or device generating the event is located. For example, if a customer logs on to a terminal server in California, the time zone of the log on event is Pacific Standard Time.
The server time zone is the time zone where the BRM server performing rating is located. For example, if a user in California logs on to a terminal server in California, but the BRM server rating this event is in New York, the server time zone is Eastern Standard Time.
In BRM, you use time zone IDs to specify time zones. For example, depending on the context, you can use one of the following time zone IDs to specify Pacific Standard Time:
PST (short abbreviation)
America/Los Angeles (unambiguous long descriptive format)
BRM supports only the time zone IDs defined in instances of the Java TimeZone class.
By default, a subset of those Java-supported time zone IDs is included in the internal BRM time_zones table. To be available for use in BRM, a time zone ID must be listed in that table. If you try to use a time zone ID that is not in the table, the Connection Manager (CM) will encounter errors.
The time_zones table is used to populate the BRM_Home/sys/cm/ timezones.txt file, where BRM_Home is the directory in which BRM is installed, which contains a user-accessible list of all time zone IDs available for use in your system.
You can add time zone IDs to your system by using the sample_timezone.txt file.
Important:The name of any time zone ID that you add to your system must match the name of a time zone ID in the Java TimeZone class. To get a list of time zone IDs in the TimeZone class, use the following function:
You specify the server time zone by entering its ID in the rating_timezone entry of the CM configuration file (pin.conf).
For information about time zone ID format, see "About Time Zone IDs."
The following is an example of a rating_timezone entry with a valid time zone ID:
- fm_rate rating_timezone Europe/Andorra
The default server time zone ID is America/Los_Angeles.
Important:To add multiple custom time zones to the file, enter each time zone entry on a separate line.
To rate events based on a time zone not available to BRM by default, you must add an entry for the new time zone ID to the internal time_zones table and configure the pin.conf file to read the new ID.
To add a time zone ID to BRM, do the following:
Open the BRM_Home/sys/cm/timezones.txt file. This file lists all time zone IDs in the database time_zones table. The file is regenerated each time the CM is started.
If a time zone ID that you need is missing, open the BRM_Home/sys/cm/sample_timezone.txt file.
Add an entry for the new time zone ID as described in the sample_timezone.txt file.
Important:Each time zone ID contains 13 mandatory parameters. The tzone_name parameter must be unique (not in the time_zones table), and it must match the name of a time zone ID in the TimeZone class (see "About Time Zone IDs.").
Note:To add multiple custom time zone IDs to the file, enter each time zone ID entry on a separate line.
Save and close the sample_timezone.txt file.
Add the following entry to the Connection Manager (CM) pin.conf file:
-fm_rate timezone_file sample_timezone.txt
Save and close the file.
Stop and restart the CM.
For information on setting the server time zone, see "Setting the Server Time Zone".
When a BRM client application or service integration client (such as RADIUS Manager and Universal Event Loader) generates an event, that event includes time zone data. You must configure event-generating applications to generate the correct time zone data. This means creating an entry in a pin.conf or properties file. See the configuration section of your client application or the service integration component documentation for details.
By default, in real-time rating an event's end time is used to determine a product's validity.
You can specify that the event start time should be used for checking the product's validity by adding an entry to the CM configuration file.
To use the event start time to determine the valid product:
Open the CM pin.conf file in BRM_Home/sys/cm.
Add the use_prods_based_on_start_t entry:
- fm_rate use_prods_based_on_start_t /event
You can use /event to use the start time for all events, or a subclass of /event to specify just events of a given type.
Stop and restart the CM.