Automatic sales receipt allocation (API)

SUGGESTED

We currently use Sage 200 Cloud and the Sage APIs to feed in data from our bespoke ERP system.

We post an average of about 800 receipts a day, prior to invoices being raised, and therefore there are tens of thousands of unallocated receipts, even though the customer account balances are zero.

I try to do this via the APIs but it's nearly impossible as I've got to look through things individually to retrieve various outstanding items (one-by-one for each customer) and then send back the allocations.

Surely there's a much easier way to do this?!

Thanks

  • 0

    Set the customers' Account Type as Auto Allocate? Works well when each invoice has a corresponding receipt (eg,. web sales)

  • 0 in reply to Geoff Turner

    Thanks Geoff.

    I'd seen this in an old post from about 4 years ago, however couldn't find the option for this anywhere in their account settings so assumed it could have been removed.

    We'd also need to set this when creating the customer account to begin with as there are hundreds being created each day so we wouldn't possibly be able to get them all manually.

  • 0 in reply to Steve Browett

    It's on the Payment tab in Enter New Account.  And it would be nice if it was included in Customer Defaults!

    However it can be done in script:

    Imports Sage.Accounting
    Imports Sage.Common.UI
    Imports System
    'Sage.MMS.SalesLedger.EnterNewCustomerAccountForm
    'Default to Auto Allocation account
    Module addInModule
    Private accountTypeEnumComboBox as Sage.ObjectStore.Controls.EnumComboBox
    Public Sub Main
    	accountTypeEnumComboBox=form.FindControlByName("accountTypeEnumComboBox").UnderlyingControl
    	AddHandler form.NewBusinessObjectSelected,AddressOf NewBusinessObjectSelected
    	NewBusinessObjectSelected(New NewBusinessObjectSelectedEventArgs With {.BusinessObject=form.BoundObjects(0)})
    End Sub
    Private Sub NewBusinessObjectSelected(e As NewBusinessObjectSelectedEventArgs)
    	Ctype(e.BusinessObject,SalesLedger.Customer).CustomerAccount.TradingAccountType= EnumTradingAccountType.TradingAccountTypeAutoAllocation 
    	accountTypeEnumComboBox.SelectedIndex=EnumTradingAccountType.TradingAccountTypeAutoAllocation 
    End Sub
    End Module
    

    Should have been easier, but accountTypeEnumComboBox isn't bound to CustomerAccount.TradingAccountType. Must be an early form from Sage!

  • 0
    SUGGESTED

    Hi Steve,

    It looks as though Geoff has managed to provide you with an answer to your issue. You are correct though via the API, you need to be sending POST requests to the sales_allocations endpoint which require you to provide the ids of the invoices/receipts you wish to allocate.

    The script provided will help you with the auto allocation settings of the SL account.

    If you require any further support, feel free to email [email protected] or raise a case on My Sage.