Creating customer through API aka stored procedures

SUGGESTED

I have been trying to create a customer in Sage 500 by means of sage provided stored procedures. To start with, I have my own stored procedure which creates a record in staging table, ie. stgCustomer. Thereafter, I invoke a stored procedure(api by Sage 500) named "spARapiCustomerIns" which, in turn, is responsible to migrate my record from staging table to permanent table. This works fine except in one condition and that is:

Each company has certain configurations which are stored in table named "tarOptions". Above set-up fails when I have an option named "Track Sales Tax On Sales Order" set to false for certain company. The reason, as I figured out after going through 1000s of lines of stored procedure code is that the procedure "spARapiCustomerIns" sets a field named STaxSchdID based on the selected customer class. Now, this happens regardless of any condition. But moving forward, this sage stored procedure invokes another stored procedure named "spARCustAddrVal" to validate the customer's address and this validation fails due to the presence of STaxSchdID(as it should be empty if "Track Sales Tax On Sales Order" is set to false) which, by the way, is set by Sage 500 stored procedure. 

I need help to work around this situation without making any changes to Sage stored procedures(as that would be risky). I may be missing something here or there may be some simple solution to this but I can't think of any. 

I would appreciate any kind of help as this is a kind of dead-end for me and I can't think any further.

P.S. - Sorry for such a verbose detailed explanation but don't know any better way.