Click or drag to resize

AdministrationClientOpenTransactionBatch Method

Initialise the Batch for submitting file(s) containing Transaction. The service returns the Batch Details, containing a key for calling the subsequent workflow Transaction Batch methods.

This method is a step in the workflow for Transaction File Batch submission.

Remarks
Transaction File Batch submission workflow:
  • Initialise Batch - call Web Service Method: OpenTransactionBatch
  • Submit Transaction File(s) - call Web Service Method: LoadTransactionBatch
  • Monitor submitted Transaction Batch Progress - call Web Service Method: QueryTransactionBatch
  • Stop The Transaction Batch Processing - call Web Service Method: CancelTransactionBatch
  • Analyse the final results of The Transaction Batch Processing - call Web Service Method: ReportTransactionBatch
Syntax
C#
public ResultOfBatch OpenTransactionBatch(
	ManagementGroupRequestOfOpenBatch OpenTransactionBatch1
)

Parameters

OpenTransactionBatch1
Type: AdministrationServiceManagementGroupRequestOfOpenBatch

Return Value

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

  var openBatch = new AdministrationService.OpenBatch();
  openBatch.BatchOwnerRSN = new Guid("adf6537e-60ab-4d1d-b19b-1473569f396a");; //Required - usually AccountOwnerRSN of the logged in admin
  openBatch.FileName = "ImportTransactions.csv"; //Required - uploaded file name
  openBatch.Merge = true; //Required - Merge to existing transactions based on matching rules

  request.Value = openBatch;

  AdministrationService.ResultOfBatch result = svc.OpenTransactionBatch(request);

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