Click or drag to resize

AdministrationClientAdjustmentTransaction Method

Submit a Adjustment Transaction. An Adjustment Transaction can be used to correct the Points Balance for a Customer Service function.

The updated Card Ponts Balance is returned.

Remarks
  • The Transaction generated requires to be approved. Approval is completed via the Service Method: ApproveTransaction
  • TransactionID is optional. If no TransactionID is submitted, then a unique TransactionID is returned by the Service
  • Transaction Value must be between a configurable Minimum and Maximum value
  • The submitted Transaction Date must be Less Than or Equal to the current Date and Time
Syntax
C#
public ResultOfTransactionProduct AdjustmentTransaction(
	ManagementGroupRequestOfPartnerAdjustmentTransaction request
)

Parameters

request
Type: AdministrationServiceManagementGroupRequestOfPartnerAdjustmentTransaction

Return Value

Type: ResultOfTransactionProduct
Examples
C#
using (var svc = new AdministrationService.AdministrationClient())
{
  var request = new AdministrationService.ManagementGroupRequestOfPartnerAdjustmentTransaction();
  request.Token = "Token";//Required - Token returned from AccountService.ManagementGroupLogin
  request.ManagementGroup = "Management group";//Required - ManagementGroup supplied when calling AccountService.ManagementGroupLogin

  var adjustmentTransaction = new AdministrationService.PartnerAdjustmentTransaction();
  adjustmentTransaction.TransactionID = "Transaction ID"; //Optional - Must be unique. Will be generated if not supplied
  adjustmentTransaction.PartnerID = "Partner ID";
  adjustmentTransaction.TerminalID = "Terminal_ID_1 ID"; //Optional
  adjustmentTransaction.CashierCode = "Cashier_Code_1"; //Optional
  adjustmentTransaction.ClientVersion = "Client_Version"; //Optional
  adjustmentTransaction.CardNumber = "21000005"; //Required
  adjustmentTransaction.TransactionDate = DateTime.Now; //Required - cannot be a future date
  adjustmentTransaction.TransactionAdjustmentValue = 1234.56m; //Required - Number of points to add/subtract. Must be a value between -100000.00 and 100000.00
  adjustmentTransaction.TransactionNotes = "Please process transaction with haste"; //Optional
  adjustmentTransaction.ProductCode = "Product_123"; //Optional
  adjustmentTransaction.ItemDescription = "Red Bag"; //Optional
  adjustmentTransaction.Quantity = 2; //Optional
  adjustmentTransaction.Department = "Bags"; //Optional
  adjustmentTransaction.DiscountReason = "Loyal customer"; //Optional
  adjustmentTransaction.Category = "Products";//Optional
  adjustmentTransaction.AdjustmentInternalNote = "Customer returning item";//Optional
  adjustmentTransaction.AdjustmentReason = "Item not satisfactory";//Optional
  adjustmentTransaction.AdjustmentReasonNote = "Item needs repair";//Optional
  adjustmentTransaction.AdjustmentType = "Goodwill";//Optional
  adjustmentTransaction.CustomerAccountID = "CA_123";//Optional - links the transaction to a customer account
  adjustmentTransaction.Reference = "REF_123";//Optional

  var transactionCustomFields = new AdministrationService.ProfileCustomFieldValues();
  transactionCustomFields.CustomText_1 = string.Empty; //Optional CustomText_2 - CustomText_15 available
  transactionCustomFields.CustomBoolean_1 = false; //Optional CustomBoolean_2 - CustomBoolean_20 available
  transactionCustomFields.CustomDate_1 = DateTime.MinValue; //Optional CustomDate_2 - CustomDate_15 available
  transactionCustomFields.CustomDecimal_1 = 0.0M; //Optional CustomDecimal_2 - CustomDecimal_5 available
  transactionCustomFields.CustomInteger_1 = 0; //Optional CustomInteger_2 - CustomInteger_10 available
  adjustmentTransaction.CustomFieldValues = transactionCustomFields;//Optional

  request.Value = adjustmentTransaction;

  AdministrationService.ResultOfTransactionProduct result = svc.AdjustmentTransaction(request);

  if (result.FaultCode == 0)
  {
    //Request succeeded
  }
  else
  {
    //Request failed
    throw new Exception(result.FaultDescription);
  }
}
See Also