Bango uses cookies to give you the best website experience. By using this website you agree to let Bango use cookies. More info
OK
Bango Developer
  1. Bango Resale
  2. Reseller
  3. Batch Processing

Batch processing

Processing of multiple requests as part of a batch

In the Bango Platform, entitlements describe a user's ability to access a service provided by a merchant. In some circumstances you might not be able to implement our API methods and want to use an alternitive solution to carry out actions on your entitlements.

To support this Bango Resale offers a batch processing feature where customers can provide a file to Bango Amazon S3 bucket.

Bango Amazon S3 bucket structure

The S3 bucket will contain folders for archive, input and output.

File name and encoding

The input and output files will be Windows-1252 encoded file containing RFC4180 comma separate values (CSV). The input and output file names will be structured in the following format - ResellerName_Action_yyyyMMddHHmmss.csv.

File processing

Files will be picked up from the input directory, moved to a temporary processing directory and the results will be split into two seperate folder directories and files for success and error. The error file will be populated with any entitlements that returned a http status code outside of the 200 range.

Once an input file is processed it will be moved to the archive directory.

Input file format

The file should include a header row. The header row and field formats are defined below and in the example action batch files. The maximum file size supported is 1000 rows (excluding the header).

All columns listed for CANCEL, REVOKE, SUSPEND and RESUME are mandatory. Only action and entitlementId are mandatory for UPDATE.

ActionColumns
CANCELaction, entitlementId, reasonCategory, reasonCode, reasonDescription
REVOKEaction, entitlementId, reasonCategory, reasonCode, reasonDescription
SUSPENDaction, entitlementId, reasonCategory, reasonCode, reasonDescription
RESUMEaction, entitlementId, reasonCategory, reasonCode, reasonDescription
UPDATEaction, entitlementId, productKey, notificationUrl, dateExpiry, customerIdentifier, extensionData
Example input files

File name - BangoReseller_TERMINATE_20191012112013.csv

action,entitlementId,reasonCategory,reasonCode,reasonDescription
CANCEL,dc48733b-a8a2-475a-8ff1-2dbe6716277e,CUSTOMER_CANCELLED,NOT_RENEWED,Customer has not renewed their entitlement
REVOKE,d12fa153-6bcf-4b0a-b399-158e15d16bff,ACTIVATION_ROLLBACK,FRAUD,Entitlement has been cancelled due to known fraud

File name - BangoReseller_SUSPEND-RESUME_20191123170452.csv

action,entitlementId,reasonCategory,reasonCode,reasonDescription
SUSPEND,d7342f06-0382-4bf9-a7f8-eb2bcad07728,ACTIVATION_ROLLBACK,CUSTOMER_PAYMENT_DEFAULT,Customer has defaulted payment.
RESUME,5d5adb03-f803-49d0-b1c8-4ed67e67a2bb,ACTIVATION_RESUMED,CUSTOMER_PAYMENT_RESUMED,Customer has updated payment method.

File name - BangoReseller_UPDATE_20191207095617.csv

action,entitlementId,productKey,notificationUrl,dateExpiry,customerIdentifier,extensionData
UPDATE,aa4dc268-f6c9-48a6-a6f1-4de4d021c747,Product2,,,,TestingKey1.TestingValueA;TestingKey2.TestingValueB

Example output file

File name - BangoReseller_TERMINATE_20191112112013.csv

action,entitlementId,customerIdentifier,productKey,entitlementDisplayName,offerKey,merchantAccountKey,activationCode,dateCreated,dateActivated,dateEnded,dateExpiry,dateFailed,dateSuspended,dateResumed,responseCode,responseMessage,status,extensionData,parameters
CANCEL,dc48733b-a8a2-475a-8ff1-2dbe6716277e,dfb35f4c-5dc4-4eba-b9b2-cfcc22e08d34,Product1,Entitlement1,,BANGO,,2019-10-10T10:21:08Z,2019-10-10T10:21:07Z,2019-10-11T13:31:18Z,2050-02-01T06:00:00Z,0001-01-01T00:00:00Z,,,OK,Success,CANCELLED,"{""CancelReasonCategory"":""CUSTOMER_CANCELLED"",""CancelReasonCode"":""NOT_RENEWED"",""CancelReasonDescription"":""Customer has not renewed their entitlement""}",
REVOKE,d12fa153-6bcf-4b0a-b399-158e15d16bff,c9363a1a-a814-4d6a-96d7-aff90cc757f3,Product1,Entitlement2,,BANGO,,2019-10-10T10:21:08Z,2019-10-10T10:21:07Z,2019-10-11T13:31:18Z,2050-07-19T10:00:00Z,0001-01-01T00:00:00Z,,,OK,Success,REVOKED,"{""CancelReasonCategory"":""ACTIVATION_ROLLBACK"",""CancelReasonCode"":""FRAUD"",""CancelReasonDescription"":""Entitlement has been cancelled due to known fraud""}",

File name - BangoReseller_SUSPEND-RESUME_20191123170452.csv

action,entitlementId,customerIdentifier,productKey,entitlementDisplayName,offerKey,merchantAccountKey,activationCode,dateCreated,dateActivated,dateEnded,dateExpiry,dateFailed,dateSuspended,dateResumed,responseCode,responseMessage,status,extensionData,parameters
SUSPEND,d7342f06-0382-4bf9-a7f8-eb2bcad07728,dfb35f4c-5dc4-4eba-b9b2-cfcc22e08d34,Product1,Entitlement1,,BANGO,,2019-10-10T10:21:08Z,2019-10-10T10:21:07Z,0001-01-01T00:00:00Z,2050-02-01T06:00:00Z,0001-01-01T00:00:00Z,2019-11-04T23:08:31Z,,OK,Success,SUSPENDED,,
RESUME,5d5adb03-f803-49d0-b1c8-4ed67e67a2bb,c9363a1a-a814-4d6a-96d7-aff90cc757f3,Product1,Entitlement2,,BANGO,,2019-10-10T10:21:08Z,2019-10-10T10:21:07Z,0001-01-01T00:00:00Z,2050-07-19T10:00:00Z,0001-01-01T00:00:00Z,2019-11-04T23:09:01Z,2019-12-01T05:57:03Z,OK,Success,ACTIVE,,

File name - BangoReseller_UPDATE_20191207095617.csv

action,entitlementId,customerIdentifier,productKey,entitlementDisplayName,offerKey,merchantAccountKey,activationCode,dateCreated,dateActivated,dateEnded,dateExpiry,dateFailed,dateSuspended,dateResumed,responseCode,responseMessage,status,extensionData,parameters
UPDATE,aa4dc268-f6c9-48a6-a6f1-4de4d021c747,dfb35f4c-5dc4-4eba-b9b2-cfcc22e08d34,Product2,Entitlement1,,BANGO,,2019-10-10T10:21:08Z,2019-10-10T10:21:07Z,0001-01-01T00:00:00Z,2050-02-01T06:00:00Z,,,OK,Success,ACTIVE,"{""TestingKey1"":""TestingValueA"",""TestingKey2"":""TestingValueB""}",

COMING SOON

Support for create entitlement batch processing.

In this section:

See also:

    Copyright © 2000–2020 Bango.net Limited