Product Data Model

The UDRs in PCC.Products stores product related data. A product controls the behavior of a bucket.

See APL - PCC Runtime Support - Buckets for further information about how to use the PCC.Products UDRs with APL and REST HTTP Interface - Products for information on how to access the PCC.Products UDRs from the REST HTTP interface.

The main parts of PCC.Products are:

Object

Description

Object

Description

Product

The product holds information about the capacity of the counters, the enforcements and notifications that should be triggered at specific capacity levels, the interval at which the counters should be reset, how many counters to retain at reset, and, if the product stops, fallthrough in the usage recording process. Since a product is used by buckets it is important not to remove products in use.

ProductMapping

A flexible mapping table used to map from an external representation to a list of products. The external representation can be, for instance, a rating group, or a combination of rating group and time period classification. The mapping should not include any information related to a specific subscriber.

SubscriberProfile

Subscriber profiles are used for associating different products to different profiles. The subscribers will then have access to the products associated with their subscriber profile.

Overview of the Product Data Model

The different UDRs within the Product Data Model are connected as follows:

Overview of the Product Data Model

ProductMapping UDR

In the ProductMapping UDR you set up the priority for the product mapping, the rating groups, etc that the product mapping should use, and the products that should be applied.

Field

Description

Field

Description

ID (int)

The unique ID of the product mapping table.

Priority (int)

The priority of the mapping object, a low value indicates a high priority. Determines the order in which the matched mapping objects are returned.

Arguments (list<string>)

The arguments of a mapping object, e g the rating group.

Targets (list<Product>)

The different products used by the mapping object.

Below is a screenshot of the UDR Assistance displaying the ProductMapping UDR:

ProductMapping UDR

Example - ProductMapping UDR

The following values:

will give the following setup:

  • The first product mapping, with ID 101, has a higher priority than the second, with ID 102.

  • The first product mapping refers to rating group 4, while the second product mapping refers to rating group 8.

  • The first product mapping references product 100 and 110, while the second product mapping references product 100.

Product UDR

The Product UDR holds information about the capacity of the counters, the enforcements and notifications that should be triggered at specific capacity levels, the interval at which the counters should be reset, and how many counters to retain at reset. If StopFallthrough is set to yes, counting for this product should prevent counting in buckets connected to lower priority products. Since a product is used by buckets it is important not to remove products in use.

Field

Description

Field

Description

Id (int)

The unique product ID.

Name (string)

The name of the product.

Capacities (list<Capacity>)

Defines the capacities for all counter items relevant for this product. A capacity is used to measure threshold values for enforcements and notifications. For unlimited capacity ignore this field.

Price (int)

Optional price information.

Currency (string)

Currency of price, e g USD, EUR, etc.

Duration (int)

When creating a bucket this field can be used to set the value for the bucket stop time.

DurationUnit (int)

The unit of the duration, for instance day, week, or month. 1 = minute, 2 = hour, 3 = day, 4 = week, 5 = month and 6 =year. ResetType (int) The type of reset, reset from start (1) or reset from date (2).

Enforcements (list<Enforcement(PCC. Product)>)

Holds a list of enforcement definitions, see the section below, Enforcement UDR.

Notifications (list<Notification(PCC.Product)>)

Holds a list of notification definitions, see the section below, Notification UDR.

ResetType (int)

The type of reset; reset from start (1), which means that if the reset interval is set to "Month", for example, then the buckets connected to the product in question will be reset at the start of the month, even if the day and time in the bucket's StartTime is something else, or reset from date (2), which means that the bucket will be reset at StartTime plus ResetInterval .



Note!

This is just an example configuration which may be changed in the Workflow template.



ResetInterval (int)

The interval with which this product is reset. Resetting a product involves clearing the bucket associated with this product. If set to 0 the product is never reset.

ResetIntervalUnit (int)

The unit of the reset interval, for instance day, week, or month. 1 = minute, 2 = hour, 3 = day, 4 = week, 5 = month and 6 =year.

RetainedCounters (int)

Controls the number of counters that are retained in the bucket counters list at reset.

For example, if the product has an hourly reset interval and RetainedCounters is 24 the bucket will hold discrete usage counter statistics for the last 24 hours.

Periods (list<Period (PCC.Periods)>)

Determines the list of periods during which the product should be active. The periods in the stated list can contain one or several sub periods, which means that you can combine different time settings in one period. See Periods Data Model Buckets for further information.

StartTime (date)

The start time for the product.

StopTime (date)

The stop time for the product.

StopFallthrough (boolean)

Used in the product selection process. When usage is reported, the first step is to determine the products associated with the reported usage. This results in a product priority list. The next step is to iterate the list and report usage in the associated bucket. If StopFallthrough is true on the product then iteration stops with this.

StopAtCapacity (boolean)

Determines if the counter for a bucket should continue to count or not when 100% capacity for the bucket has been reached. If set to false, the counter will continue counting. If set to true, the counter will stop once 100% capacity for the bucket is reached.

Misc (map<string, any>)

See Misc Field for more information.

Below is a screenshot of the UDR Assistance displaying the Product UDR:

Product UDR

Example - Products UDR

The following values:

will give the following setup:

  • The two products have the IDs 100 and 110, which are used by both PCC Rules and PCC Buckets, and have the names Gold and Silver .

  • The Gold product uses capacities 101 and 102, while the Silver product only uses capacity 101.

  • The Gold product will be available for 7 days from the time you start to use it, while the Silver product will be available for 24 hours from the time you start to use it.

  • Both products use the enforcement 605.

  • The Gold product will receive notifications 1, 3 and 5, while the Silver product will receive notifications 2 and 4.

  • The reset and retained counters settings for the Gold product will reset the product once every day, based on date, and discreet usage counter statistics will be kept for 10 days.

  • The reset and retained counters settings for the Silver product will reset the product once every week, based on date, and discreet usage counter statistics will be kept for 2 weeks.

  • The Gold product will be active during the time periods stated in the Periods list 503, while the Silver product will be active during the time periods stated in the Periods list 504.

  • The Gold product will start on the 1st of June and end on the 1st of September, 2011, while the Silver product will start on the 1st of January, 2011 and end on the 1st of January, 2012.

  • For both products, counting will stop once the bucket for the respective product is full.

SubscriberProfile UDR

In the SubscriberProfile UDR you can configure different subscriber profiles. The profiles associate subscriber types with certain products, and many subscribers can share the same profile.

Field

Description

Field

Description

ID (int)

The unique id of the subscriber profile.

Name (string)

The name of the subscriber profile.

Products (list<Product>)

The products that should be associated with the profile.

Misc (map<string, any>)

See Misc Field for more information.

Below is a screenshot of the UDR Assistance displaying the SubscriberProfile UDR:

SubscriberProfile UDR

Capacity UDR

In the Capacity UDR you define the capacity for counter items. A capacity is used for measuring threshold values for enforcements and notifications.

Field

Description

Field

Description

ID (int)

The unique capacity ID.

Name (string)

The name of the capacity.

Capacity (long)

This parameter can be used for specifying the capacity of the counter type.

CapacityUnit (int)

This parameter can be used for specifying the unit of the capacity; 0 - bytes, 1 - kB, 2 - MB, 3 - GB, 4 - Event, 5 - Hour, 6 - Minute, or 7 - Other.

CounterType (byte)

This parameter can be used for specifying the type of counter this capacity applies to; 0 - input, 1 - output, or 2 - total.

CounterUnit (int)

This parameter can be used for specifying the unit of the counter; 0 - bytes, 1 - kB, 2 - MB, 3 - GB, 4 - Event, 5 - Hour, 6 - Minute, or 7 - Other.

QuotaDefault (long)

This parameter can be used in the APL code for setting a default quota that will be reserved for a request. If this quota is not available, you can configure the minimum amount of quota, specified by the QuotaMinimum field, to be tried instead.

QuotaMinimum (long)

This parameter can be used in the APL code for specifying the minimum amount of quota that needs to be available to grant a request. If this quota is not available, you can configure the request to be denied.

Misc (map<string, any>)

See Misc Field for more information.

Below is a screenshot of the UDR Assistance displaying the Capacity UDR:

Capacity UDR

Enforcement UDR

The Enforcement UDR sets a threshold for when an enforcement should be triggered, and is used by both the Product UDR and PCC Rules. A Product can use one or several enforcements. When the usage exceeds enforcement threshold, the enforcement will be applied. When a new enforcement is triggered a new PCC rule should be applied.

Field

Description

Field

Description

ID (int)

The unique enforcement ID.

CounterType (byte)

The type of counter this enforcement refers to; input (0), output (1) or total (2).

Level (double)

The level at which this enforcement is triggered. Can be a percentage or absolute. Levels that are less than, or equal to 1, will be interpreted as a percentage value.

Name (string)

The name of this enforcement.

Misc (map<string, any>)

See Misc Field for more information.

Below is a screenshot of the UDR Assistance displaying the Enforcement UDR:

Enforcement UDR

Notification UDR

With the Notification UDR you can configure notifications to be sent out at different usage levels. Each product can use several notifications.

Field

Description

Field

Description

ID (int)

The unique ID for this notification.

Name (string)

The name of this notification.

CounterType (byte)

The type of counter this notification refers to; input (0), output (1) or total (2).

Level (double)

The usage level at which this notification is triggered. Can be a percentage or absolute. Levels that are less than, or equal to 1, will be interpreted as a percentage value.

Required (boolean)

Indicates whether the notification should be required or not. If this field is set to false, the notification will not be sent unless it has been stated in the Subscriber UDR, see Subscriber UDR in Buckets Data Model. If this field is set to true, the notification will always be sent regardless of what is stated in the Subscriber UDR.

Type (string)

The type of notification, for instance SMS or email.

Address (string)

The address the notification should be sent to.

Message (string)

The message to be sent as part of the notification.

Misc (map<string, any>)

This field can contain information about product ID or product name, for instance. See Misc Field for more information.

Below is a screenshot of the UDR Assistance displaying the Notification UDR:

Notification UDR