Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The allocation profile shows up in the GUI according to the image below:

Image RemovedImage Added

The next step is for the external system to use CreateDepositCashOrder in to send a number of deposits to BFS where the deposits can be associated with Allocation Profiles and then orders to buy the products in the allocation profile will be created. 

...

The code for generating the deposits looks like this:

Code Block
languagec#
themeRDark
titleC# - CreateDepositCashOrder
linenumberstrue
//Create two deposits with the CreateDepositCash method
var client = new BFSServiceReference.bfsapiSoapClient();

var credentials = new BFSServiceReference.Credentials()
{
    UserName = bfsusername, //Username of administrative user in your instance of BFS
    Password = bfspassword, //Password of the administrative user in your instance of BFS
};

var response = client.CreateDepositCashOrders(new BFSServiceReference.CreateDepositCashOrderRequest()
{
    Credentials = credentials,

    identify = bfsidentifier, //Identifier is a unique token for your instance of BFS        

    Entities = new[]
    {
        new DepositCashOrder()
        {
            AccountNo = "10032589",
            Amount = 100,
            CurrencyCode = "SEK",
            ExternalReference = "Deposit1"
        },
        new DepositCashOrder()
        {
            AccountNo = "10011484",           
            Amount = 110,
            CurrencyCode = "SEK",
            ExternalReference = "Test2",
            OrderSettlementType = OrderSettlementType.PAYMENT,
            AllocationProfileId = new Guid("ea03c9b6-e4f7-4c24-b7cb-1142fcd6faad"),
            LinkedAmount = 100M

        }
    }

});

//Show information about the batch order that was generated
Console.WriteLine(response.batchId + ", " + response.batchOrderNo);
//Show information about the individual deposit orders
Console.WriteLine("Orders:");
foreach (var c in response.Orders)
{
    Console.WriteLine(c.OrderId + ", " + c.OrderNo);
}

The results below show the created batch order first and then the individual orders that were created.

Image Added

The GUI looks like this:

Image Added

 

The next step is to process the batch order which would be automatically executed when the matching bank transfer file is imported.

For this article we can do this manually by navigating to the batch order and trigger the next workflow transition.

Image Added

In the resulting ticket we will write the settlement date, value date and the custody account to use for the deposit.

Image Added

The custody account now shows the aggregated deposit of 210 SEK while the individual deposits show on the BFS-accounts of the customer:

Image Added

Customer BFS-account:

Image Added