This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
versago:record_submission_report_configuration [2019/06/04 14:23] runger [Database Trigger for Processing] |
versago:record_submission_report_configuration [2019/11/13 13:45] (current) |
||
|---|---|---|---|
| Line 11: | Line 11: | ||
| The following documents contain additional information that may be helpful with understanding these processes. | The following documents contain additional information that may be helpful with understanding these processes. | ||
| - | * Versago – Administration | + | * [[versago: |
| - | * Versago – Payment Processing Configuration Guide | + | * [[versago: |
| - | * Versago – Reports Configuration | + | * [[versago: |
| ====== Special Terminology ====== | ====== Special Terminology ====== | ||
| Line 21: | Line 21: | ||
| ====== Before You Begin ====== | ====== Before You Begin ====== | ||
| - | Review the [[versago: | + | Review the **//[[versago: |
| ====== To Begin ====== | ====== To Begin ====== | ||
| Line 50: | Line 50: | ||
| The “Record Submission” page is used to configure the report for record selection. When the “Enable Record Submission” checkbox is selected, additional configuration items are displayed. | The “Record Submission” page is used to configure the report for record selection. When the “Enable Record Submission” checkbox is selected, additional configuration items are displayed. | ||
| - | {{: | + | {{ : |
| Also select the “Process Payments” option checkbox if this report will be used for accepting and processing credit card and eCheck payments. | Also select the “Process Payments” option checkbox if this report will be used for accepting and processing credit card and eCheck payments. | ||
| Line 56: | Line 56: | ||
| Configuration of Record Submission reports for payments is described in the documents //Versago – Payments Setup//. | Configuration of Record Submission reports for payments is described in the documents //Versago – Payments Setup//. | ||
| - | See the [[# | + | See the //**[[# |
| ===== Calendar tab ===== | ===== Calendar tab ===== | ||
| Line 82: | Line 82: | ||
| The Selection Screen setup defines what the users sees on the Report page where they select the items for submission. Click the [**View Example**] button to see a generic version of a record selection screen. | The Selection Screen setup defines what the users sees on the Report page where they select the items for submission. Click the [**View Example**] button to see a generic version of a record selection screen. | ||
| - | {{: | + | {{ : |
| - | - The two checkboxes | + | - The two check-boxes |
| - The “Editable field” selection causes a field with the current value (the open balance of an invoice, for example) to be displayed on the selection page and allows the user to change the value (to pay less than the balance, for example). | - The “Editable field” selection causes a field with the current value (the open balance of an invoice, for example) to be displayed on the selection page and allows the user to change the value (to pay less than the balance, for example). | ||
| - The “Show and submit …” selection causes the values the user enters in the editable field for the selected records to be summed, the sum displayed at the bottom of that column and submitted to the next step in the process which is the confirmation screen. | - The “Show and submit …” selection causes the values the user enters in the editable field for the selected records to be summed, the sum displayed at the bottom of that column and submitted to the next step in the process which is the confirmation screen. | ||
| Line 92: | Line 92: | ||
| Here is an example of how the selection page might look, followed by the confirmation page. | Here is an example of how the selection page might look, followed by the confirmation page. | ||
| - | {{: | + | {{ : |
| - | {{: | + | {{ : |
| ===== Confirmation Screen ===== | ===== Confirmation Screen ===== | ||
| Line 100: | Line 100: | ||
| The Confirmation Screen setup defines what the users sees on the page where they review the items selected for submission. This setup is required for payment processing. Click the [**View Example**] button to see a generic version of a confirmation screen. | The Confirmation Screen setup defines what the users sees on the page where they review the items selected for submission. This setup is required for payment processing. Click the [**View Example**] button to see a generic version of a confirmation screen. | ||
| - | {{: | + | {{ : |
| - Check the “Include a Confirmation Screen …” checkbox to provide a screen with a summary of their selections. | - Check the “Include a Confirmation Screen …” checkbox to provide a screen with a summary of their selections. | ||
| Line 115: | Line 115: | ||
| The final piece of the setup process is to define where the information selected by the user will be stored in the database. | The final piece of the setup process is to define where the information selected by the user will be stored in the database. | ||
| - | {{: | + | {{ : |
| - Select a database from the “Database” drop-down list. | - Select a database from the “Database” drop-down list. | ||
| Line 127: | Line 127: | ||
| ====== Submission Database Table Structure Details ====== | ====== Submission Database Table Structure Details ====== | ||
| - | As noted earlier, a table to hold the information related to the selected records is stored in a table in the specified database. All record submission tables have the same basic structure as described | + | As noted earlier, a table to hold the information related to the selected records is stored in a table in the specified database. All record submission tables have the same basic structure as described |
| - | ^Column Name ^Type and Size^Notes | + | ====== |
| - | |User columns from initial setup appear first | | + | |
| - | |vgo_PaymentDate | + | |
| - | |vgo_PaymentDetails | + | |
| - | |vgo_CC_RespCode | + | |
| - | |vgo_TransID | + | |
| - | |vgo_PaymentType | + | |
| - | |vgo_CreatedBy | + | |
| - | |vgo_CreateDate | + | |
| - | |vgo_CreatedById | + | |
| - | |vgo_PostingStatus | + | |
| - | |vgo_PostingDate | + | |
| - | |vgo_PostingId | + | |
| - | |vgo_BatchId | + | |
| - | |User columns added after initial setup appear last| | + | |
| - | | | | + | |
| - | + | ||
| - | - **Payment Processing** items are used by the internal payment process. These values are only populated for payment transaction. | + | |
| - | - **Creation Information** items are populated for all transactions. | + | |
| - | - **vgo_CreatedBy**: | + | |
| - | - **vgo_CreateDate**: | + | |
| - | - **vgo_CreatedById**: | + | |
| - | - **Processing Control** items can be used to manage back-end processing using tools such as Bizweaver. | + | |
| - | - **vgo_PostingStatus**: | + | |
| - | - **vgo_PostingDate**: | + | |
| - | - **vgo_PostingId**: | + | |
| - | - **vgo_BatchId**: | + | |
| - | + | ||
| - | + | ||
| - | ====== | + | |
| In a Versago environment, | In a Versago environment, | ||
| Line 164: | Line 135: | ||
| Most record submission reports will have an associated Bizweaver workflow to handle additional processing. For payments this might be creating SAP Business One Incoming Payment transactions. Or it might be updating the status on a group of orders. | Most record submission reports will have an associated Bizweaver workflow to handle additional processing. For payments this might be creating SAP Business One Incoming Payment transactions. Or it might be updating the status on a group of orders. | ||
| - | There are two ways to initiate this processing. | + | There are two ways to initiate this processing. |
| - | + | ||
| - | The following discussion assumes that you have some knowledge about database triggers and have access to the SQL Server tools needed to install them. | + | |
| - | + | ||
| - | ===== Multi-Select Records Processing ===== | + | |
| - | A basic database trigger to initiate Bizweaver processing for records selection will look like this. | + | |
| - | + | ||
| - | <code sql multiSelect_trigger_sql.txt> | + | |
| - | CREATE TRIGGER [dbo].[TriggerName] | + | |
| - | ON [dbo].[TableName] | + | |
| - | AFTER INSERT | + | |
| - | AS | + | |
| - | BEGIN | + | |
| - | -- SET NOCOUNT ON added to prevent extra result sets from | + | |
| - | -- interfering with SELECT statements. | + | |
| - | SET NOCOUNT ON; | + | |
| - | -- | + | |
| - | declare @vgo_BatchID int, @object int, @url varchar(5000), | + | |
| - | @pArgVariableName nvarchar(50) | + | |
| - | -- | + | |
| - | select @vgo_BatchID = vgo_BatchID from inserted | + | |
| - | select @BWServerName = ' | + | |
| - | select @BWServerPort = ' | + | |
| - | select @WorkflowID = ' | + | |
| - | select @pArgVariableName = ' | + | |
| - | -- | + | |
| - | -- Remember that the URL may require https:// and the port will be 443 if you are using SSL. | + | |
| - | select @url = ' | + | |
| - | exec sp_OACreate ' | + | |
| - | exec sp_oamethod @object, ' | + | |
| - | exec sp_oamethod @object, ' | + | |
| - | --select @responsetext as [Response] | + | |
| - | -- select @url | + | |
| - | exec sp_oadestroy @object | + | |
| - | END | + | |
| - | </ | + | |
| - | + | ||
| - | The values in red are entered manually when the trigger is created. Your Bizweaver administrator can provide this information for you. | + | |
| - | + | ||
| - | ===== Payments Processing ===== | + | |
| - | A basic database trigger to initiate Bizweaver processing for payments will look like this. | + | |
| - | + | ||
| - | <code sql payments_trigger_sql.txt> | + | |
| - | CREATE TRIGGER [dbo].[twbs_tr_VersagoPayments] | + | |
| - | ON [dbo].[Versago_Payments] | + | |
| - | AFTER INSERT | + | |
| - | AS | + | |
| - | BEGIN | + | |
| - | -- SET NOCOUNT ON added to prevent extra result sets from | + | |
| - | -- interfering with SELECT statements. | + | |
| - | SET NOCOUNT ON; | + | |
| - | -- | + | |
| - | DECLARE | + | |
| - | @vgo_BatchID INT, | + | |
| - | @object INT, | + | |
| - | @url VARCHAR(5000), | + | |
| - | @bw_url nvarchar(100), | + | |
| - | @bw_WorkflowID int, | + | |
| - | @bw_port int, | + | |
| - | @pArgVariableName nvarchar(50) | + | |
| - | -- | + | |
| - | select | + | |
| - | t0.BW_URL, t0.BW_Port, t0.BW_WorkflowID | + | |
| - | from vgoCommon_20190604A..twbs_vgo_payment_InfoMapping t0 | + | |
| - | -- | + | |
| - | select @vgo_batchid = (select vgo_batchid from inserted) | + | |
| - | select @bw_url = (select t0.bw_url from vgoCommon_20190604A..twbs_vgo_payment_InfoMapping t0) | + | |
| - | select @bw_port = (select t0.bw_port from vgoCommon_20190604A..twbs_vgo_payment_InfoMapping t0) | + | |
| - | select @bw_Workflowid = (select t0.BW_WorkflowID from vgoCommon_20190604A..twbs_vgo_payment_InfoMapping t0) | + | |
| - | -- | + | |
| - | SELECT @url = @bw_url + '/ | + | |
| - | EXEC sp_OACreate ' | + | |
| - | EXEC sp_oamethod @object, ' | + | |
| - | EXEC sp_oamethod @object, ' | + | |
| - | --select @responsetext as [Response] | + | |
| - | -- select @url | + | |
| - | EXEC sp_oadestroy @object | + | |
| - | END | + | |
| - | </ | + | |
| - | + | ||
| - | The following video illustrates this process. | + | |
| - | {{ : | + | The more sophisticated approach is to initiate the workflow when the submission is saved to the database. For the second option a database trigger is used. |
| - | It is also possible | + | The SQL database first needs to be initialized |
| + | <WRAP center round important 90%> | ||
| + | Descriptions of the initialization process and examples of various triggers are found **// | ||
| + | </ | ||