Catalog Item Purchases

Required Catalog Item Purchase Column Headings describes the catalog item purchase CSV column headings.

Use the following to purchase catalog items:
  • BulkCatalogItemPurchase — Purchase catalog items for subscriptions.
  • BulkGroupCatalogItemPurchase — Purchase catalog items for groups.
Table 1. Required Catalog Item Purchase Column Headings
Column Heading Required/Optional Notes
SubscriberSearchData or GroupSearchData Required
  • For SubscriberSearchData, this heading is used to identify the subscription.
    The format must be ID type + ID value (for example, Imsi+408239-2039 or ExternalId+extId23). Valid ID types are:
    • ObjectId
    • ExternalId
    • PhoneNumber
    • Imsi
    • AccessNumber
    • LoginId
    • AccessId
  • For GroupSearchData, this heading is used to identify the group.
    The format must be ID type + ID value (for example, ExternalId+extId23). Valid ID types are:
    • ObjectId
    • ExternalId
    • MultiRequestIndex
OfferRequestArray Required Either the CatalogItemId, ProductOfferId, or ExternalId must be present. Other fields in the MtxPurchasedOfferData MDC are optional. For more information about the MtxPurchasedOfferData MDC fields, see the discussion about MtxPurchasedOfferData.
ChargeMethodData Optional All fields in the MtxChargeMethodData MDC are optional.
EligibilityCheck Optional If true (default), eligibility rule evaluation will be performed. If false, eligibility rule evaluation will be skipped.

The process_bulk_csv.py script supports CSV files in which the value in a key/value pair is an array of objects only for catalog item purchase operations. For this operation, the script reads an array of offers for the specified subscriber.

Each MtxPurchasedOfferData MDC must be in a single row. This results in a single SubscriberId request with multiple rows in the CSV file. For each unique SubscriberId, the content of each OfferRequestArray is combined into an array and a single JSON request is sent to the RS Gateway . Offer Request Array Example 1 shows example data for an offer request array for a subscription (subId1).

Table 2. Offer Request Array Example 1
SubscriberSearchData OfferRequestArray.$ OfferRequestArray.ProductOfferId
ExternalId+subId1 MtxPurchasedOfferData 1
ExternalId+subId1 MtxPurchasedOfferData 5
ExternalId+subId2 MtxPurchasedOfferData 1
The following code is an example of a CSV file for catalog item purchases.
SubscriberSearchData,OfferRequestArray.$,OfferRequestArray.CatalogItemId
ExternalId+SubId1,MtxPurchasedOfferData,23
ExternalId+SubId1,MtxPurchasedOfferData,22
ExternalId+SubId2,MtxPurchasedOfferData,23

For an offer request array, each offer must be a record in a row in the CSV file. The column must be sorted by the SubscriberSearchData to group each SubscriberSearchData value. In each row for the same SubscriberSearchData value, the ChargeMethodData field values for identical fields must be the same. If the field values are not the same, only the field value in the first row is used for the request and values for that field in the subsequent rows for that SubscriberSearchData value are ignored.

Offer Request Array Example 2 shows example data for an offer request array for subscriptions subId1 and subId2 with ChargeMethodData. This data results in two JSON requests to the RS Gateway (2 records for subId1 and 1 record for subId2). If the ChargeMethodData.PaymentMethodResourseId value in the second row for subId1 had been different (for example, 5081), then only the value in the first row would be used in the request and the ChargeMethodData.PaymentMethodResourseId value in the second row would be ignored.
Table 3. Offer Request Array Example 2
SubscriberSearchData OfferRequestArray.$
SubscriberId+subId1 MtxPurchasedOfferData
SubscriberId+subId1 MtxPurchasedOfferData
SubscriberId+subId2 MtxPurchasedOfferData
Table 4. Offer Request Array Example 2 (continued)
OfferRequest

Array.CatalogItemId

ChargeMethodData.$ ChargeMethodData.PaymentMethodResourseId
23 MtxChargeMethodData 4082
22 MtxChargeMethodData 4082
23 MtxChargeMethodData 1232
The following code is an example of a CSV file for catalog item purchases for the data shown in Offer Request Array Example 2.
SubscriberSearchData,OfferRequestArray.$,OfferRequestArray.CatalogItemId,ChargeMethodData.PaymentMethodResourseId 
SubscriberId+SubId1,MtxPurchasedOfferData,23,MtxChargeMethodData,4082
SubscriberId+SubId1,MtxPurchasedOfferData,22,MtxChargeMethodData,4082
SubscriberId+SubId2,MtxPurchasedOfferData,23,MtxChargeMethodData,1232

For information about multi-level JSON formatting, see the discussion about multi-level JSON operations.