Commerce5 has been specially designed to support existing customizations in Counterpoint that have been implemented for Orders, Deposit Tickets and Customers using custom stored procedures that follow NCR’s documented naming convention.


In addition to this, Commerce5 also utilizes custom stored procedures in the Counterpoint database that are ONLY used by Commerce5 which makes it easier and safer to implement customizations that will only be applied to Web Orders, Deposit Tickets and Customers

.

Note: It is HIGHLY recommend that any customizations are tested in a Development Counterpoint Database BEFORE being published to the Production Counterpoint Database.


All support for customizations that are implemented using these stored procedures will be provided by the NCR Partner.



Tip: Commerce5 includes a setting that allows for the ALL custom stored procedures to NOT be executed during the order import process. This is a great way to troubleshoot the order import process and determine if a customization is causing a problem.



When an order is imported from Magento into CounterPoint the following stored procedures are executed in this order:


Customer Stored Procedures

  • USER_AR_CUST_BEFORE_COMMIT_TRANSACTION_MAGE
    • ONLY Executed by Commerce5 which is a great way to modify a customer BEFORE the customer record is saved to the database without worrying about the custom code affecting the customer maintenance process in Counterpoint
  • USER_AR_CUST_BEFORE_COMMIT_TRANSACTION
    • Standard Counterpoint custom stored procedure which is a great way to modify a customer BEFORE the customer record is saved to the database
  • USER_AR_CUST_AFTER_COMMIT_TRANSACTION_MAGE
    • ONLY Executed by Commerce5 which is a great way to modify a customer AFTER the customer record is saved to the database without worrying about the custom code affecting the customer maintenance process in Counterpoint
  • USER_AR_CUST_AFTER_COMMIT_TRANSACTION
    • Standard Counterpoint custom stored procedure which is a great way to modify a customer AFTER the customer record is saved to the database


Customer Shipping Address Stored Procedures

  • USER_AR_SHIP_BEFORE_COMMIT_TRANSACTION_MAGE
    • ONLY Executed by Commerce5 which is a great way to modify a shipping address BEFORE the shipping address record is saved to the database without worrying about the custom code affecting the shipping address maintenance process in Counterpoint
  • USER_AR_ SHIP_BEFORE_COMMIT_TRANSACTION
    • Standard Counterpoint custom stored procedure which is a great way to modify a shipping address BEFORE the shipping address record is saved to the database
  • USER_AR_ SHIP_AFTER_COMMIT_TRANSACTION_MAGE
    • ONLY Executed by Commerce5 which is a great way to modify a shipping address AFTER the shipping address record is saved to the database without worrying about the custom code affecting the shipping address maintenance process in Counterpoint
  • USER_AR_ SHIP_AFTER_COMMIT_TRANSACTION
    • Standard Counterpoint custom stored procedure which is a great way to modify a shipping address AFTER the shipping address record is saved to the database


Order and Deposit Ticket Stored Procedures

  • USER_BEFORE_ORD_INSUFF_QTY
    • Executed BEFORE order lines are converted to a Backorder/Special Order Line
  • USER_AFTER_ORD_INSUFF_QTY
    • Executed AFTER order lines are converted to a Backorder/Special Order Line
  • USER_BEFORE_PS_TE_COMMIT_DOC_MAGE
    • ONLY Executed by Commerce5 which is a great way to modify web orders BEFORE inventory has been committed without worrying about the custom code affecting regular POS transactions in Counterpoint
  • USER_BEFORE_PS_TE_COMMIT_DOC
    • Standard Counterpoint custom stored procedure that is used to modify transactions BEFORE inventory is committed
  • PS_TE_COMMIT_DOC
    • Standard Counterpoint stored procedure that commits inventory for the transaction
    • CAN NOT BE MODIFIED
  • USER_AFTER_PS_TE_COMMIT_DOC_MAGE
    • ONLY Executed by Commerce5 which is a great way to modify web orders AFTER inventory has been committed without worrying about the custom code affecting regular POS transactions in Counterpoint
  • USER_AFTER_PS_TE_COMMIT_DOC
    • Standard Counterpoint custom stored procedure that is used to modify transactions AFTER inventory is committed
  • USER_AFTER_PS_TE_SAVE_DOC
    • Standard Counterpoint custom stored procedure that is used to modify transactions AFTER transaction has been saved to the database


Custom Stored Procedure Templates


Customer Stored Procedures


CREATE PROCEDURE [dbo].[USER_AR_CUST_BEFORE_COMMIT_TRANSACTION_MAGE]

                @CUST_NO T_CUST_NO,

                @Action T_FLG

as

-- ------------------------------------------------------------------

begin -- begin procedure

                set nocount on

                set ansi_warnings off

END


CREATE PROCEDURE [dbo].[USER_AR_CUST_BEFORE_COMMIT_TRANSACTION]

                @CUST_NO T_CUST_NO,

                @Action T_FLG

as

-- ------------------------------------------------------------------

begin -- begin procedure

                set nocount on

                set ansi_warnings off

END


CREATE PROCEDURE [dbo].[USER_AR_CUST_AFTER_COMMIT_TRANSACTION_MAGE]

                @CUST_NO T_CUST_NO,

                @Action T_FLG

as

-- ------------------------------------------------------------------

begin -- begin procedure

                set nocount on

                set ansi_warnings off

END


CREATE PROCEDURE [dbo].[USER_AR_CUST_AFTER_COMMIT_TRANSACTION]

                @CUST_NO T_CUST_NO,

                @Action T_FLG

as

-- ------------------------------------------------------------------

begin -- begin procedure

                set nocount on

                set ansi_warnings off

END


Customer Shipping Address Stored Procedure Templates


CREATE procedure [dbo].[USER_AR_SHIP_ADRS_BEFORE_COMMIT_TRANSACTION_MAGE]

                @CUST_NO T_CUST_NO,

                @SHIP_ADRS_ID T_COD,

                @Action T_FLG

as

-- ------------------------------------------------------------------

begin -- begin procedure

                set nocount on

                set ansi_warnings off

END


CREATE procedure [dbo].[USER_AR_SHIP_ADRS_BEFORE_COMMIT_TRANSACTION]

                @CUST_NO T_CUST_NO,

                @SHIP_ADRS_ID T_COD,

                @Action T_FLG

as

-- ------------------------------------------------------------------

begin -- begin procedure

                set nocount on

                set ansi_warnings off

END


CREATE procedure [dbo].[USER_AR_SHIP_ADRS_AFTER_COMMIT_TRANSACTION_MAGE]

                @CUST_NO T_CUST_NO,

                @SHIP_ADRS_ID T_COD,

                @Action T_FLG

as

-- ------------------------------------------------------------------

begin -- begin procedure

                set nocount on

                set ansi_warnings off

END


CREATE procedure [dbo].[USER_AR_SHIP_ADRS_AFTER_COMMIT_TRANSACTION]

                @CUST_NO T_CUST_NO,

                @SHIP_ADRS_ID T_COD,

                @Action T_FLG

as

-- ------------------------------------------------------------------

begin -- begin procedure

                set nocount on

                set ansi_warnings off

END


Order and Deposit Ticket Stored Procedure Templates


CREATE PROCEDURE [dbo].[USER_BEFORE_ORD_INSUFF_QTY]

                -- Add the parameters for the stored procedure here

                @DocID T_DOC_ID

AS

BEGIN

                -- SET NOCOUNT ON added to prevent extra result sets from

                -- interfering with SELECT statements.

                SET NOCOUNT ON;

END


CREATE PROCEDURE [dbo].[USER_AFTER_ORD_INSUFF_QTY]

                -- Add the parameters for the stored procedure here

                @DocID T_DOC_ID

AS

BEGIN

                -- SET NOCOUNT ON added to prevent extra result sets from

                -- interfering with SELECT statements.

                SET NOCOUNT ON;

END


CREATE PROCEDURE [dbo].[USER_BEFORE_PS_TE_COMMIT_DOC_MAGE]

                -- Add the parameters for the stored procedure here

                @DocID T_DOC_ID

AS

BEGIN

                -- SET NOCOUNT ON added to prevent extra result sets from

                -- interfering with SELECT statements.

                SET NOCOUNT ON;

END


CREATE PROCEDURE [dbo].[USER_BEFORE_PS_TE_COMMIT_DOC]

                -- Add the parameters for the stored procedure here

                @DocID T_DOC_ID,

                @DocAction T_FLG

AS

BEGIN

                -- SET NOCOUNT ON added to prevent extra result sets from

                -- interfering with SELECT statements.

                SET NOCOUNT ON;

END


CREATE PROCEDURE [dbo].[USER_AFTER_PS_TE_COMMIT_DOC_MAGE]

                -- Add the parameters for the stored procedure here

                @DocID T_DOC_ID

AS

BEGIN

                -- SET NOCOUNT ON added to prevent extra result sets from

                -- interfering with SELECT statements.

                SET NOCOUNT ON;

END


CREATE PROCEDURE [dbo].[USER_AFTER_PS_TE_COMMIT_DOC]

                -- Add the parameters for the stored procedure here

                @DocID T_DOC_ID,

                @DocAction T_FLG

AS

BEGIN

                -- SET NOCOUNT ON added to prevent extra result sets from

                -- interfering with SELECT statements.

                SET NOCOUNT ON;

END


CREATE PROCEDURE [dbo].[USER_AFTER_PS_TE_SAVE_DOC]

                -- Add the parameters for the stored procedure here

                @DocID T_DOC_ID

AS

BEGIN

                -- SET NOCOUNT ON added to prevent extra result sets from

                -- interfering with SELECT statements.

                SET NOCOUNT ON;

END