Skip Headers
Oracle® Communications Billing and Revenue Management Content Manager
Release 7.5

E16699-06
Go to Documentation Home
Home
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
PDF · Mobi · ePub

7 Using Content SDK

This chapter describes how to use Oracle Communications Billing and Revenue Management (BRM) Content SDK.

To use Content SDK to connect to a billing provider, you should be familiar with Java programming. See "Understanding BRM Content SDK" for more information.

Using Content SDK

To use Content SDK:

  1. Register with a billing provider. See "Registering with a Billing Provider" for more information.

  2. Configure the Infranet.properties file. See "Configuring the Infranet.properties File" for more information.

  3. Test your connection with your billing provider by using the sample application (CDKSample) included with Content SDK. See "Testing Your Connection" for more information.

  4. Set up Content SDK to make authentication, authorization, and accounting (AAA) requests for your content server.

    For more information on Content SDK java class methods, see the Content SDK API reference. For information on how to use these classes to perform AAA operations, see the CDKSample.java and CDKSampleUtils.java files.

Registering with a Billing Provider

To register as a content provider, you and the billing provider must determine the following:

  • Appropriate content categories for each type of content you will provide. These categories are used for customer authorization and to calculate billing and remittance.

  • Whether you will use real-time or batch accounting.

    You can have your billing provider rate usage events in real-time or batch mode. Use real-time rating to rate usage events as they occur. Use batch rating to rate events stored in a usage log.

    If you use batch accounting determine:

    • The target host and directory at the billing provider where you send usage logs.

    • The file transfer method, such as FTP or HTTP.

      Note:

      See the CDKSample file for information on how to use real-time and batch rating.
  • Whether you will authorize customers or rate usage based on any extended fields supported by your billing provider. See "Adding Custom Fields to Requests" for more information.

Configuring the Infranet.properties File

You might need to configure parameter value settings in the BRM_Home/apps/CDK/Infranet.properties file to support your implementation where BRM_Home is the directory in which you installed the BRM software.

This listing shows the default entries in the Infranet.properties file after Content SDK installation:

infranet.log.file=cdk.log
infranet.log.name=ContentDeveloperKit
infranet.log.level=3
infranet.connection=pcp://<login>:<password>@<hostname>:<port>/service/pcm_client
infranet.login.type=1
infranet.log.logallebuf=true
infranet.program.name=ContentDeveloperKit
infranet.errusagelog.file=cdkerrorusagelog.log
infranet.usagelog.file=cdkusage.log
infranet.usagelog.maxrecords=10000
infranet.errusagelog.maxrecords=10000
infranet.connectionpool.maxsize=8
infranet.connectionpool.minsize=4
infranet.connectionpool.timeout=30000
infranet.connectionpool.maxidletime=40000

See "Configuring the Connection Pool" in BRM System Administrator's Guide for information on the four connection pool parameters.

Table 7-1 describes Content SDK-specific parameters in the BRM_Home/apps/CDK/Infranet.properties, where BRM_Home is the directory in which you installed the BRM software.

Table 7-1 Parameters Specific to Content SDK in Infranet.Properties File

Parameter Description

infranet.errusagelog.file

(Optional) Records failed accounting operations, such as not finding a subscriber account or denying a subscriber access to content of a particular category.

The value of this parameter specifies the prefix and suffix of the log file name when it is saved.

Default value: cdkerrorusagelog.log

When the log file is saved, the date and time (based on a 24-hour clock) are included in the file name using this format:

cdkerrorusagelog_yyyy_mm_dd_hh_mm_ss.log

Log file name example:

cdkerrorusagelog_2002_12_14_18_30_21.log

infranet.usagelog.file

(Optional) Contains usage records for batch accounting.

The value of this parameter specifies the prefix and suffix of the log file name when it is saved.

Default value: cdkusage.log

cdkusage_yyyy_mm_dd_hh_mm_ss.log

Log file name example:

cdkusage_2002_12_14_18_30_21.log

infranet.usagelog.maxrecords

(Optional) The maximum number of records put in the usage log file before it is before it is saved and closed.

Default value: 10000

infranet.errusagelog.maxrecords

(Optional) The maximum number of records put in the error log file before it is before it is saved and closed.

Default value: 10000


Error Handling

See "Connection Pool Error Handling" in BRM System Administrator's Guide for information on connection pool error handling.

Testing Your Connection

To test your connection to a billing provider, use the sample application, CDKSample, that is shipped with Content SDK.

Using the Sample Application

This section describes how to use CDKSample to execute these functions:

See "About CDKSample Operation Parameters" for a description of the parameters used with these operations.

To run the sample application:

  1. Use a colon (:) as the separator character in the makefile.

  2. Copy the Infranet.properties file from the BRM_Home/apps/CDK directory to the BRM_Home/source/apps/CDKSamples directory.

    Note:

    The source files are installed in the BRM_Home/source/apps/CDKSamples directory. The .jar files are installed in the BRM_Home/jars directory.
  3. Make sure the cdk.jar, pcm.jar, pcmext.jar, and pfc.jar files are in the classpath directory.

    Note:

    Make sure that the recommended version of JDK is installed and the required environment variables are set, before you run the make command.
  4. Run make to build the sample application.

Running CDKSample

This section describes the syntax for running the Content SDK sample application. The parameters are described in "About CDKSample Operation Parameters".

Authentication

To run an authentication operation, use this syntax:

java CDKSample authenticate -u userid [-p password]

Authorization

To run an authorization operation, use this syntax:

java CDKSample authorize -u userid -c category -d description -p providerId [-q quantity | -a amount] [-s start_time] [-e end_time] [-r Authorization_ID]

Important:

You must put double quotes around the start_time and end_time values, for example:
”10/OCT/2004:10:08:45 AM PST”

Cancel Authorization

To run a cancel authorization operation, use this syntax:

java CDKSample cancelauthorization -u userid -r Authorization_ID

Batch Accounting

To run a batch accounting operation, use this syntax:

java CDKSample batch_acct -u userid -c category -d description -p providerId [-q quantity | -a amount] [-s start_time] [-e end_time] [-r Authorization_ID]

Note:

  • You must put double quotes around the start_time and end_time values, for example:

”10/OCT/2004:10:08:45 AM PST” 
  • This operation adds the usage information to the file specified in the infranet.usagelog.file entry of the Infranet.properties configuration file. The specified file is sent periodically to the billing provider for rating.

Real-Time Accounting

To run a real-time accounting operation, use this syntax:

java CDKSample realtime_acct -u userid -c category -d description -p providerId [-q quantity | -a amount] [-s start_time] [-e end_time] [-r Authorization_ID]

Important:

You must put double quotes around the start_time and end_time values, for example:
”10/OCT/2004:10:08:45 AM PST”

Renaming the Log Files

To rename the log file, use this syntax:

java CDKSample renamelog -t [usage | error] [-n filename]

To send the current CDR file for rating instead of waiting for the maximum record size to be reached, rename the usage log file.

Note:

The maximum record size is specified with the "infranet.usagelog.maxrecords" parameter in the Infranet.properties file.

About CDKSample Operation Parameters

Table 7-2 describes the parameters used with CDKSample operations:

Table 7-2 Parameters Used with CDKSample Operations

Parameter Description

classpath

The path of the .jar files (cdk.jar, pcm.jar, pcmext.jar)

-a amount

The dollar cost of prerated content.

Important: Do not use the -a parameter with the -q parameter.

-c category

The category of the requested or served content.

-d description

A description of the requested or served content.

-e end_time

The time when access to the content was ended.

Use this format, with double quotes around the value:

”dd/MMM/yyyy:hh:mm:ss a ZZZ”

where:

    MMM = first three letters of month

   a = AM or PM

   ZZZ = time zone

Example:

”10/OCT/2004:10:08:45 AM PST”

-n filename

The new file name of the log or error file.

-p password or provider ID

(Optional) For authentication operations, the password of the content purchaser.

For authorization and accounting operations, your content provider ID.

-q quantity

The quantity of content purchased.

Note: Do not use the -q parameter with the -a parameter.

-r authorization_id

An identifier used to retrieve authorization details from Content Manager.

If this value is specified during an authorization request, it will be used as the identifier of the object that encapsulates authorization details in Content Manager. In the accounting operations, it will be used to retrieve the details of authorization.

-s start_time

The time when access to content was started.

Use this format, with double quotes around the value:

”dd/MMM/yyyy:hh:mm:ss a ZZZZ”

where:

    MMM = first three letters of month

   a = AM or PM

   ZZZZ = time zone

Example:

”10/OCT/2004:10:08:45 AM PST”

-t usage | error

Specifies whether the usage or error log file is being renamed.

-u userid

The user ID of the content purchaser.


Content SDK Classes

Table 7-3 describes the Content SDK Java classes:

Table 7-3 Content SDK Classes

Class Description

PortalAccountingReq

Encapsulates usage request records.

PortalAccountingResult

Encapsulates accounting results.

PortalAuthenticationReq

Encapsulates authentication requests.

PortalAuthenticationResult

Encapsulates authentication results.

PortalAuthorizationReq

Encapsulates authorization request records.

PortalAuthorizationResult

Encapsulates authorization results.

PortalCDKConstants

Defines the constants used in Content SDK.

PortalLogFactory

Contains a name-value pair consisting of a logfile name and the corresponding PortalLogObj. The class returns a singleton instance of a named log file.

PortalLogObj

Logs usage records. This log class manages logging to a specific log file.

PortalObj

Encapsulates AAA operations.

PortalOpRequest

Base class for requests.

PortalOpResult

Base class for results.


For more information on Content SDK java class methods, see the API reference.

Adding Custom Fields to Requests

If your billing provider supports authorization and rating based on extended information, ask them for the correct label and value pairs to use in your requests. Use the setExtendedData method in the PortalAccountingReq and PortalAuthorization classes.

Sample Use of the setExtendedData Method

If your billing provider can support rating based on extended information, such as location, ZIP code, and language information, call the setExtendedData method as follows:

PortalAuthorizationReq
   AuthorizeExt = new PortalAuthorizationReq(...)
   AuthorizeExt.setExtendedData(”LOCATION”, ”USA”)
   AuthorizeExt.setExtendedData(”ZIP”, ”95014”)
   AuthorizeExt.setExtendedData(”LANGUAGE”, ”ENGLISH”)

Receiving Additional Custom Information

Your billing provider may include additional information as name-values pairs in authorization responses.

This sample code shows how to access extended data returned to you from your billing provider:

Portalobj pObj = new PortalObj (...);
PortalAuthorizationReq aReq = new PortalAuthorizationReq (...);
PortalAuthorizationResult aRes = pObj.AuthorizeUsage (areq);
Hashtable extended_data = aReq.getExtendedData();

This sample code shows how to iterate through the hash table to retrieve extended data values:

if (extended_data != null) {
     for (Enumeration e = extended_data.keys();
               e.hasMoreElements() ;) {
          String name = (String) e.nextElement();
          String value = (String)
               extended_data.get(name);
     }
          .....

About the Content Manager Opcodes

You use the Content Manager standard opcodes to:

Managing Access Lists

You specify the third-party content that a customer is allowed to use by using an access list. You create access lists by:

  1. Defining all of your content service definitions. Each service definition contains a list of allowed or denied content. See "Setting Up Access and Deny Lists" for more information.

  2. Associating products with content service definitions by using Pricing Center or a custom client application. See "Pricing Content Products" for more information.

When a customer purchases a product from a third-party content provider, the customer is granted all access privileges associated with that product.

BRM stores content provider access lists in /service/content objects in the BRM database. Each object stores the following:

  • The customer profile associated with the access list.

  • Access list mode (allow or deny).

  • List of content categories. See "About Content Categories" for more information.

You create, modify, and retrieve /service/content objects by using the Content Manager SET and GET opcodes.

Creating or Modifying an Access List

Use PCM_OP_CONTENT_SET_SRVC_FEATURES to create or modify /service/content objects.

Important:

This opcode overwrites any existing data in the /service/content object.

PCM_OP_CONTENT_SET_SRVC_FEATURES performs the following:

  1. Validates data in the input flist. The opcode verifies that only one access list mode is specified and that there are no duplicate content category entries.

  2. Deletes any existing data in the specified /service/content object.

  3. Calls the PCM_OP_CUST_MODIFY_SERVICE opcode to create or modify the specified /service/content object.

  4. Returns the POID of the /service/content object and PIN_FLD_STATUS set to the status of the transaction.

Retrieving an Access List

Use PCM_OP_CONTENT_GET_SRVC_FEATURES to retrieve an access list from the BRM database. For example, a client application might call this opcode to display all third-party content that a customer is allowed to access.

This opcode takes as input the POID of the /service/content object and returns:

  • The access list mode (allow or deny)

  • The list of content categories

Authenticating, Authorizing, and Rating Content Usage

Use the following opcodes to process AAA requests from third-party content providers:

Authenticating Customers

Use PCM_OP_CONTENT_AUTHENTICATE to verify a customer's identity. This opcode operates in two modes:

  • Password Authentication Protocol (PAP) mode. In PAP mode, the opcode verifies the customer's login and password.

  • Challenge Handshake Authentication Protocol (CHAP) mode. In CHAP mode, the opcode verifies the customer's login only and assumes that the calling application will verify the customer's password. The opcode returns the unencrypted clear-text password to the calling application.

PCM_OP_CONTENT_AUTHENTICATE performs the following:

  1. Calls PCM_OP_CONTENT_POL_RESOLVE_USER to find the customer login for any request IDs it receives.

    Note:

    PCM_OP_CONTENT_AUTHENTICATE cannot determine whether it received a request ID or a customer login.
  2. Calls PCM_OP_ACT_FIND_VERIFY to verify the customer's login.

  3. Determines whether to operate in PAP or CHAP mode by checking the password field in the input flist:

    • If the password field is supplied, PCM_OP_CONTENT_AUTHENTICATE operates in PAP mode. The opcode verifies the validity of the password.

    • If the password field is not present, PCM_OP_CONTENT_AUTHENTICATE operates in CHAP mode. The opcode looks up the password, calls PCM_OP_CUST_POL_DECRYPT_PASSWD to decrypt the password, and adds the clear-text password to the output flist.

  4. Returns the following, depending on the status of the transaction.

    • When authentication succeeds, PCM_OP_CONTENT_AUTHENTICATE returns the POID of the /service/content object, the POID of the customer's /account object, and PIN_FLD_RESULT set to PIN_ACT_VERIFY_PASSED. When operating in CHAP mode, PCM_OP_CONTENT_AUTHENTICATE also returns the unencrypted clear-text password.

    • When authentication fails, PCM_OP_CONTENT_AUTHENTICATE returns PIN_FLD_RESULT set to PIN_ACT_VERIFY_FAILED.

Authorizing Customers to Access Third-Party Content

Use PCM_OP_CONTENT_AUTHORIZE to authorize customers for specific third-party content, such as video games or ring tones.

This opcode performs the following:

  1. Calls the PCM_OP_CONTENT_POL_RESOLVE_USER policy opcode to resolve the given request ID to a customer login.

    Note:

    PCM_OP_CONTENT_AUTHORIZE cannot determine whether it received a request ID or a customer login.
  2. Locates the /service/content object with the given login.

  3. If the input flist contains extensions used to calculate the cost of the event, calls the PCM_OP_CONTENT_POL_RESOLVE_EVENT_EXTENSIONS policy opcode to get extended fields to rate the event.

  4. Calls the PCM_OP_CONTENT_POL_AUTHORIZE policy opcode to perform authorization checks.

  5. Calls PCM_OP_RESERVE_CREATE to determine the cost of access and to create a resource reservation based on the cost.

    If PCM_OP_RESERVE_CREATE returns a failure, PCM_OP_CONTENT_AUTHORIZE calls PCM_OP_CONTENT_POL_POST_AUTHORIZE to determine whether the failure was due to insufficient resources or denied access.

  6. Returns the following, depending on the status of the transaction:

    • When successful, PCM_OP_CONTENT_AUTHORIZE returns the POID of the /service/content object and the PIN_FLD_STATUS field set to PIN_CONTENT_STATUS_OK.

    • When the transaction fails, PCM_OP_CONTENT_AUTHORIZE returns the PIN_FLD_STATUS field set to PIN_CONTENT_STATUS_NOK and the PIN_FLD_REASON field set to the following:

      –   PIN_CONTENT_DENIED_ACCESS_TO_CONTENT_CATEGORY when the requested content is in a denied category.

      –   PIN_CONTENT_USER_UNKNOWN when the customer is unknown.

      –   PIN_CONTENT_CANNOT_PURCHASE_CONTENT_CATEGORY when the customer lacks sufficient resources.

Charging Customers for Content Usage

Use PCM_OP_CONTENT_ACCOUNTING to charge customers for third-party content usage.

PCM_OP_CONTENT_ACCOUNTING performs the following:

  1. Calls PCM_OP_CONTENT_POL_RESOLVE_USER to resolve the given request ID to a customer login.

    Note:

    PCM_OP_CONTENT_ACCOUNTING cannot determine whether it received a request ID or a customer login.
  2. Checks if the PIN_FLD_AUTHORIZATION_ID or PIN_FLD_AUTHORIZATION_OBJ fields are passed in. If they are, PCM_OP_CONTENT_ACCOUNTING performs the following actions:

    • Calls PCM_OP_RESERVE_FIND_OBJ to find the reservation object corresponding to this reservation number.

    • Passes the reservation object to PCM_OP_ACT_USAGE, which releases the reservation object before processing the request.

  3. Locates the /service/content object with the given login. If the object is not found, PCM_OP_CONTENT_ACCOUNTING sets PIN_FLD_STATUS to PIN_CONTENT_STATUS_NOK (a failure) and PIN_FLD_REASON to PIN_CONTENT_USER_UNKNOWN. Processing stops.

  4. If the input flist contains extensions used to calculate the cost of the event, calls PCM_OP_CONTENT_POL_RESOLVE_EVENT_EXTENSIONS to get extended fields to rate the event.

  5. Calls PCM_OP_CONTENT_POL_ACCOUNTING to perform validation checks.

  6. Checks whether the customer is allowed access to the requested content category and that the request is not a duplicate:

    1. Checks if PCM_OP_CONTENT_POL_ACCOUNTING altered the input values for content category name, content provider ID, description, amount, quantity, and extended fields. PCM_OP_CONTENT_ACCOUNTING uses any altered values.

    2. Rates and records content usage.

  7. Returns the following, depending on the status of the transaction:

    • When successful, it returns the PIN_FLD_STATUS field set to PIN_CONTENT_STATUS_OK.

    • When the transaction fails, it returns the PIN_FLD_STATUS field set to PIN_CONTENT_STATUS_NOK and PIN_FLD_REASON set to the following:

      –   PIN_CONTENT_DENIED_ACCESS_TO_CONTENT_CATEGORY when the requested content is in a denied category.

      –   PIN_CONTENT_USER_UNKNOWN when the customer is unknown.

      –   PIN_FLD_DUPLICATE_RECORD when a duplicate record is found.

Canceling Existing Authorizations

Use PCM_OP_CONTENT_CANCEL_AUTHORIZATION to cancel a previous authorization, disabling a customer's access to content.

This opcode takes as input the user ID and either the authorization ID or reservation object POID.

To cancel a previous authorization, this opcode does the following:

  • If the authorization ID is supplied, calls PCM_OP_RESERVE_FIND_OBJ to resolve the user ID and locate the user's service object and account object.

  • Looks for the reservation object that corresponds to the authorization id, service object, and account object.

  • If the reservation object is found with a released status, PCM_OP_CONTENT_CANCEL_AUTHORIZATION returns a status PIN_CONTENT_STATUS_OK.

  • If the reservation object is not found, PCM_OP_CONTENT_CANCEL_AUTHORIZATION returns a status of PIN_CONTENT_STATUS_NOK and a reason of PIN_CONTENT_INVALID_AUTHORIZATION_ID.

  • If the reservation object is found with a reserved status, PCM_OP_CONTENT_CANCEL_AUTHORIZATION calls PCM_OP_RESERVE_RELEASE. If the operation is successful, it returns with a status PIN_CONTENT_STATUS_OK. If not, returns a status of PIN_CONTENT_STATUS_NOK and reason returned by PCM_OP_RESERVE_RELEASE.

Finding Customer Accounts

Use PCM_OP_CONTENT_FIND to find the access list and account for a specified customer ID. This opcode uses the extended data to resolve the request ID supplied in the login field.

Customizing Content Manager

You can customize how Content Manager processes AAA requests from third-party content providers by using the Customer Manager policy opcodes:

Customizing Accounting

Use the PCM_OP_CONTENT_POL_ACCOUNTING policy opcode to validate accounting requests. By default, this opcode detects duplicate request events and checks if the customer is allowed access to the requested content. However, you can customize the opcode to turn off duplicate event detection or to modify the content provider ID, category description, category name, amount, and quantity.

This policy opcode is called by PCM_OP_CONTENT_ACCOUNTING.

By default, PCM_OP_CONTENT_POL_ACCOUNTING performs the following:

  • Checks whether the request is a duplicate by searching the event table for an entry that matches the event type, service POID, content provider ID, start time, end time, content category, and quantity or amount depending on whether it is a prepaid event or not.

    If the request is a duplicate, PCM_OP_CONTENT_POL_ACCOUNTING sets PIN_FLD_STATUS to PIN_CONTENT_STATUS_NOK and PIN_FLD_REASON to PIN_CONTENT_DUPLICATE_RECORD. Processing stops.

  • Reads the value for the content_use_profiles entry in the Connection Manager (CM) configuration file (BRM_Home/sys/cm/pin.conf).

    See "Setting Up Content Manager" for information on content settings for the CM pin.conf file.

  • Validates the requested content category against the service profiles for all products the customer purchased. If no service profiles are associated with the service object or if CONTENT_USE_PROFILES is set to 0 in the Connection Manager configuration file (BRM_Home/sys/cm/pin.conf), access to all content categories is allowed.

    See "Setting Up the Service Definition File" for more information on validation logic.

Customizing Authorization

Use the PCM_OP_CONTENT_POL_AUTHORIZE policy opcode to validate authorization requests. You can customize this opcode in the following ways:

  • Change how the opcode calculates the expiration time (PIN_FLD_EXPIRATION_T) for resource reservation.

  • Change the minimum acceptable authorization amount (PIN_FLD_MINIMUM) for resource reservation.

    Note:

    Return the changed value in the PIN_FLD_MIN_QUANTITY field.
  • Return the currency to use when performing amount-based authorization.

By default, PCM_OP_CONTENT_POL_AUTHORIZE performs the following:

  • Reads the content_use_profiles entry from the Connection Manager configuration file (BRM_Home/sys/cm/pin.conf).

    See "Setting Up Content Manager" for information on content settings for the CM pin.conf file.

  • Validates the requested content category against the service object for all products the customer purchased. If no service profiles are associated with the service object or if CONTENT_USE_PROFILES is set to 0 in the CM pin.conf file, access to all content categories is allowed.

    See "Content Category Authorization Rules" for information on authorization logic.

  • Calculates the expiration time for resource reservation:

    • If PIN_FLD_INTERVAL is supplied in the input flist, PCM_OP_CONTENT_POL_AUTHORIZE calculates PIN_FLD_EXPIRATION_T as the present time plus the PIN_FLD_INTERVAL value in seconds.

    • If PIN_FLD_INTERVAL is not supplied, the opcode calculates PIN_FLD_EXPIRATION_T as the present time plus one day in seconds.

  • If PIN_FLD_MINIMUM is supplied in the input flist, the value is passed to the Resource Reservation Manager (RRF). This is the minimum acceptable authorization amount.

  • Authorizes requests and reserves resources based on the customer's balance.

Content Category Authorization Rules

Content Manager uses the following logic when processing authorization requests.

If a customer purchased products where:

  • Only allow lists are present, requests whose categories are in any list are allowed. All other requests are denied.

  • Only deny lists are present, requests whose categories are in any list are denied. All other requests are allowed.

  • Allow lists and deny lists are present, requests whose categories are in an allow list and not in a deny list are allowed. All other requests are denied.

If no service definitions are specified for any of the products a customer has purchased, all requests are allowed.

Returning Extended Accounting Data

Use the PCM_OP_CONTENT_POL_POST_ACCOUNTING policy opcode to return extended data to the content provider. You can customize this policy opcode to return extended data in the EXTENDED_DATA array to PCM_OP_CONTENT_ACCOUNTING using name-value pairs.

This policy opcode is passed the input flist to PCM_OP_CONTENT_ACCOUNTING and the output flist from PCM_OP_ACT_USAGE and returns any extended data to PCM_OP_CONTENT_ACCOUNTING.

Returning Extended Authorization Data

Use the PCM_OP_CONTENT_POL_POST_AUTHORIZE policy opcode to return extended data to the caller. You can customize this policy opcode to return extended data in the EXTENDED_DATA array to PCM_OP_CONTENT_AUTHORIZE using name-value pairs.

This policy opcode is passed the input flist to PCM_OP_CONTENT_AUTHORIZE and the output flist from PCM_OP_RESERVE_CREATE and returns extended data to PCM_OP_CONTENT_AUTHORIZE.

This example returns cost and ZIP code information for the authorization response to the content provider:

0 PIN_FLD_EXTENDED_DATA ARRAY [0]
   1 PIN_FLD_NAME STR [0] ”cost”
   1 PIN_FLD_VALUE STR [0] ”0.50”
 
0 PIN_FLD_EXTENDED_DATA ARRAY [1]
   1 PIN_FLD_NAME STR [0] ”zipcode”
   1 PIN_FLD_VALUE STR [0] ”95014”

Translating Extended Events

Use the PCM_OP_CONTENT_POL_RESOLVE_EVENT_EXTENSIONS policy opcode to translate name-value pairs in the input flist to field name-value pairs. By default, this opcode returns the POID in the input flist.

For example, the extended events in the input flist could include these fields:

0 PIN_FLD_EXTENDED_DATA ARRAY[0]
   1 PIN_FLD_NAME STR[0] ”LOCATION”
   1 PIN_FLD_VALUE STR[0] ”USA”
 
0 PIN_FLD_EXTENDED_DATA ARRAY[0]
   1 PIN_FLD_NAME STR[0] ”ZIP”
   1 PIN_FLD_VALUE ST [0] ”95014”
 
0 PIN_FLD_EXTENDED_DATA ARRAY[0]
   1 PIN_FLD_NAME STR[0] ”LANGUAGE”
   1 PIN_FLD_VALUE STR[0] ”ENGLISH”

Use PCM_OP_CONTENT_POL_RESOLVE_EVENT_EXTENSIONS to translate these fields in the input flist to the following fields in the output flist:

0 PIN_FLD_EXTENDED_INFO SUBSTRUCT [0]
   1 PIN_FLD_LOCATION_INFO SUBSTRUCT [0]
      2 PIN_FLD_LOCATION STR[0] ”USA”
      2 PIN_FLD_ZIP INT[0] ”95129”
      2 PIN_FLD_LANGUAGE STR[0] ”ENGLISH”
0 PIN_FLD_OBJECT_TYPE STR[0] ”/extended”

Resolving Customer Logins

Use the PCM_OP_CONTENT_POL_RESOLVE_USER policy opcode to resolve a given request ID to the customer login of the /service/content object.

For example, a service gateway could send a content provider a customer's request ID instead of the customer's login to keep the customer anonymous to the content provider. The content provider forwards the request ID to Content Manager. Since the customer's login is required to locate the customer's account, this opcode can be used to query the gateway to resolve the service login.