Copyright © 2024, Oracle and/or its affiliates.
Field Index SQL Mapping

Class /discount

A discount is a package of one or more discounts. For example: (1) One-time signup, monthly and usage for a service. (2) A collection of prioritized usage discounts for a service. Discounts are created to package discount models and deliver them to customers in a form that they can purchase and CSRs can manipulate. For ex, when a customer signs up for a plan, they purchase the discounts included in the plan. This might include discounts related to several different services. There are two types of products: one-time purchase and subscription. One-time purchase products contain discounts that are applied only once. For ex, a one time discount of 10%. The only record of these are the purchase events. Subscription discounts contain discounts that are applied on an ongoing basis. For ex, usage and monthly discounts. These are stored in the account's discount list and are consulted when discounting events.

Notes

  • The system will assign poid ids above 1000 to objects of this class. The range below this is reserved for creating objects with well-known poid ids.
  • This object can be read by the owner or any billing group leader who is an ancestor of the owner.
  • This object can be modified only by the owner.
  • This object can be created by anyone.

Links



Field Index

Type Field Name
poid PIN_FLD_POID
timestamp PIN_FLD_CREATED_T
timestamp PIN_FLD_MOD_T
string PIN_FLD_READ_ACCESS
string PIN_FLD_WRITE_ACCESS
string PIN_FLD_CREATE_ACCESS
poid PIN_FLD_ACCOUNT_OBJ
string PIN_FLD_DESCR
timestamp PIN_FLD_END_T
string PIN_FLD_NAME
string PIN_FLD_CODE
string PIN_FLD_PERMITTED
string PIN_FLD_PROVISIONING_TAG
timestamp PIN_FLD_START_T
enum PIN_FLD_TYPE
enum PIN_FLD_MODE
decimal PIN_FLD_PRIORITY
decimal PIN_FLD_OWN_MAX
decimal PIN_FLD_OWN_MIN
decimal PIN_FLD_PURCHASE_MAX
decimal PIN_FLD_PURCHASE_MIN
poid PIN_FLD_ATTRIBUTE_OBJ
enum PIN_FLD_APPLY_MODE
int PIN_FLD_DISCOUNT_VALIDITY_ROUNDING
array PIN_FLD_USAGE_MAP
string
string
string
int
int
array PIN_FLD_DISCOUNT_CYCLE_VALIDITY
enum
array PIN_FLD_DISCOUNT_USAGE_VALIDITY
enum


Field Details

poid PIN_FLD_POID

Object Identifier for an instance of this class. Portal object ids have four pieces of information: database number, class type, sequence id, revision.

Notes

  • System defined on object creation
  • Can be modified only by System

Links


timestamp PIN_FLD_CREATED_T

Time the object was created.

Notes

  • System defined on object creation
  • Can be modified only by System

Links


timestamp PIN_FLD_MOD_T

Time the object was last modified.

Notes

  • System defined on object creation
  • Can be modified only by System

Links


string PIN_FLD_READ_ACCESS

Read Access level for object. Valid values are S(Self), G(Global), L(BrandLineage), B(BrandGroup), A(Ancestral).

Notes

  • System defined on object creation
  • Can be modified only by System
  • Maximum length is 255 bytes

Links


string PIN_FLD_WRITE_ACCESS

Write Access level for object. Valid values are S(Self), G(Global), L(BrandLineage), B(BrandGroup), A(Ancestral).

Notes

  • System defined on object creation
  • Can be modified only by System
  • Maximum length is 255 bytes

Links


string PIN_FLD_CREATE_ACCESS

Create Access level for object. Valid values are O(BrandOwner), R(Root), N(Any).

Notes

  • System defined on object creation
  • Can be modified only by System
  • Maximum length is 255 bytes

Links


poid PIN_FLD_ACCOUNT_OBJ

Link to brand object for which this object was created.

Notes

  • Required on object creation
  • Cannot be modified
  • Audit trail is created automatically when this field is modified.

Links


string PIN_FLD_DESCR

Discount description.

Notes

  • Can be specified on object creation
  • Can be modified
  • Audit trail is created automatically when this field is modified.
  • Maximum length is 255 bytes

Links


timestamp PIN_FLD_END_T

Non-inclusive end time of the validity period for the product. If the value is 0, the product is always available for purchase.

Notes

  • Can be specified on object creation
  • Can be modified
  • Audit trail is created automatically when this field is modified.

Links


string PIN_FLD_NAME

Unique name of the discount.

Notes

  • Required on object creation
  • Can be modified
  • Audit trail is created automatically when this field is modified.
  • Maximum length is 255 bytes

Links


string PIN_FLD_CODE

Unique code of the discount.

Notes

  • Required on object creation
  • Cannot be modified
  • Audit trail is created automatically when this field is modified.
  • Maximum length is 255 bytes

Links


string PIN_FLD_PERMITTED

Purchase level of the product. It can be one of 'single service' (a service type string) or 'all services' (/service) or 'all accounts and services' (NULL) or 'all accounts and no services' (/account). Subtypes of a service are implicitly included.

Notes

  • Can be specified on object creation
  • Can be modified
  • Audit trail is created automatically when this field is modified.
  • Maximum length is 255 bytes

Links


string PIN_FLD_PROVISIONING_TAG

When the discount is purchased or cancelled, the user defined provisioning tag specified in this field is used to manage profile information.

Notes

  • Can be specified on object creation
  • Can be modified
  • Audit trail is created automatically when this field is modified.
  • Maximum length is 64 bytes

Links


timestamp PIN_FLD_START_T

Inclusive absolute start time of the validity period for the product. If zero, the product is available for purchase immediately. See /deal to control the usage lifetime of the product.

Notes

  • Can be specified on object creation
  • Can be modified
  • Audit trail is created automatically when this field is modified.

Links


enum PIN_FLD_TYPE

Discount type - Item (PIN_DISC_TYPE_ITEM - 601) or Subscription (PIN_DISC_TYPE_ONGOING - 602) or System (PIN_DISC_TYPE_SYSTEM - 603).

Notes

  • Can be specified on object creation
  • Can be modified
  • Audit trail is created automatically when this field is modified.

Links


enum PIN_FLD_MODE

Discount mode - parallel (PIN_DISC_MODE_PARALLEL - 801) or cascading (PIN_DISC_MODE_CASCADING - 802).sequential - not supported (PIN_DISC_MODE_SEQUENTIAL - 803).

Notes

  • Can be specified on object creation
  • Can be modified
  • Audit trail is created automatically when this field is modified.

Links


decimal PIN_FLD_PRIORITY

Priority of the product. Higher number indicates higher priority

Notes

  • Can be specified on object creation
  • Can be modified
  • Audit trail is created automatically when this field is modified.

Links


decimal PIN_FLD_OWN_MAX

Maximum quantity that can be owned at any time. Test is inclusive - quantity must be <= max. A value of NULL means no maximum limit.

Notes

  • Can be specified on object creation
  • Can be modified
  • Audit trail is created automatically when this field is modified.

Links


decimal PIN_FLD_OWN_MIN

Minimum quantity that can be owned at any time.Test is non inclusive - quantity must be > min. A value of NULL means no minimum limit.

Notes

  • Can be specified on object creation
  • Can be modified
  • Audit trail is created automatically when this field is modified.

Links


decimal PIN_FLD_PURCHASE_MAX

Maximum quantity that can be purchased at a single time. Test is inclusive - quantity must be <= max. A value of NULL means no maximum limit.

Notes

  • Can be specified on object creation
  • Can be modified
  • Audit trail is created automatically when this field is modified.

Links


decimal PIN_FLD_PURCHASE_MIN

Minimum quantity that can be purchased at a single time. Test is non inclusive - quantity must be > min. A value of NULL means no minimum limit.

Notes

  • Can be specified on object creation
  • Can be modified
  • Audit trail is created automatically when this field is modified.

Links


poid PIN_FLD_ATTRIBUTE_OBJ

POID of the offer attribute group object.

Notes

  • Can be specified on object creation
  • Can be modified

Links


enum PIN_FLD_APPLY_MODE

Flag to trigger automatic sharing group creation: 1 Automatic, default 0

Notes

  • Can be specified on object creation
  • Can be modified
  • Audit trail is created automatically when this field is modified.

Links


int PIN_FLD_DISCOUNT_VALIDITY_ROUNDING

Discount validity rounding at discount level. Default value is 0.

Notes

  • Can be specified on object creation
  • Can be modified
  • Audit trail is created automatically when this field is modified.

Links


array PIN_FLD_USAGE_MAP

Array of entries defining how discount should be performed for different events.

Notes

  • Can be specified on object creation
  • Can be modified

Links


string PIN_FLD_EVENT_TYPE

Type of event that this entry specifies discount for. Unique within usage map. Subtypes are implicitly included.

Notes

Links


string PIN_FLD_DISCOUNT_MODEL

Discount Model name.

Notes

Links


string PIN_FLD_MODEL_SELECTOR

Model selector name.

Notes

Links


int PIN_FLD_FLAGS

Specify if this usage map is valid if the discount is at certain status. Currently we have two flags: Inactivated flag PIN_PRICE_INACTIVATED(0x01), Cancelled flag PIN_PRICE_CANCELLED(0x02). By default, the two flags should not be set, which means that this usage map is not valid when the discount status is inactivated or cancelled.

Notes

Links


int PIN_FLD_SNOWBALL_FLAG

Snowball flag - 0 indicates that it is not a snowball discount and 1 indicates that it is a snowball discount.

Notes

Links


array PIN_FLD_DISCOUNT_CYCLE_VALIDITY

Array of entries defining the discount rules for cycle events. Discount valid from the middle of the cycle - 0, Discount valid to the middle of the cycle - 1, Discount valid only part of the cycle - 2. By default the values are set to -1.

Notes

  • Can be specified on object creation
  • Can be modified

Links


enum PIN_FLD_DISCOUNT_FLAGS

Not Applicable - 0, full discount - 1, prorate - 2, No discount - 3.

Notes

Links


array PIN_FLD_DISCOUNT_USAGE_VALIDITY

Array of entries defining the discount rules for usage events. Discount valid from the middle of the cycle, Discount valid to the middle of the cycle, Discount valid only part of the cycle. By default the values are set to -1.

Notes

  • Can be specified on object creation
  • Can be modified

Links


enum PIN_FLD_DISCOUNT_FLAGS

Not Applicable - 0, full discount - 1, prorate - 2, No discount - 3.

Notes

Links




SQL Mapping


Type Field Name Table Column Name
base-class /discount discount_t
poid PIN_FLD_POID poid*
timestamp PIN_FLD_CREATED_T created_t
timestamp PIN_FLD_MOD_T mod_t
string PIN_FLD_READ_ACCESS read_access
string PIN_FLD_WRITE_ACCESS wrtie_access
string PIN_FLD_CREATE_ACCESS create_access
poid PIN_FLD_ACCOUNT_OBJ account_obj*
string PIN_FLD_DESCR descr
timestamp PIN_FLD_END_T end_t
string PIN_FLD_NAME name
string PIN_FLD_CODE code
string PIN_FLD_PERMITTED permitted
string PIN_FLD_PROVISIONING_TAG provisioning_tag
timestamp PIN_FLD_START_T start_t
enum PIN_FLD_TYPE type
enum PIN_FLD_MODE disc_mode
decimal PIN_FLD_PRIORITY priority
decimal PIN_FLD_OWN_MAX own_max
decimal PIN_FLD_OWN_MIN own_min
decimal PIN_FLD_PURCHASE_MAX purchase_max
decimal PIN_FLD_PURCHASE_MIN purchase_min
poid PIN_FLD_ATTRIBUTE_OBJ attribute_obj*
enum PIN_FLD_APPLY_MODE apply_mode
int PIN_FLD_DISCOUNT_VALIDITY_ROUNDING discount_validity_rounding
array PIN_FLD_USAGE_MAP discount_usage_map_t
string
PIN_FLD_EVENT_TYPE
event_type
string
PIN_FLD_DISCOUNT_MODEL
discount_model
string
PIN_FLD_MODEL_SELECTOR
model_selector
int
PIN_FLD_FLAGS
flags
int
PIN_FLD_SNOWBALL_FLAG
snowball_flags
array PIN_FLD_DISCOUNT_CYCLE_VALIDITY discount_cycle_validity_t
enum
PIN_FLD_DISCOUNT_FLAGS
discount_flags
array PIN_FLD_DISCOUNT_USAGE_VALIDITY discount_usage_validity_t
enum
PIN_FLD_DISCOUNT_FLAGS
discount_flags
Column names marked with * are actually column prefixes. For poid type fields, the column prefix is used to create the columns poid_id0, poid_db and poid_type if the prefix is "poid". For PIN_FLD_POID in the base table, an additional column named poid_rev is created to hold the poid revision. For buffer fields, two columns are created - one in the containing table and one in the buffer table. For example if the prefix is "buf", then the column name in the buffer table is buffer_buf and the column name in the containing table is buffer_size.


Field Index This Class