Salesmatrix

 

Customising Import Scripts

As well as the providing the Import routine to build scripts, Salesmatrix allows saved scripts to be attached to customised buttons, in order to simplify future data imports.

There are up to 4 buttons that can be connected to particular scripts.

To activate these buttons two components need to be placed in the base directory your Salesmatrix - a picture file for the button and a script file that is activated for this button. The base directory is installed, by default, on C:\Program Files\Salesmatrix\Scriptsv4.

The button pictures must be named "button1.jpg", "button2.jpg", "button3.jpg" or "button4.jpg".

In a similar fashion the script files that are activated behind these button must be called "scriptv1.smd", "scriptv2.smd", "scriptv3.smd" and "scriptv4.smd".

Editing script files

Each script file (*.Smd) file is stored as a text file. To modify the file, you can open it with a text editor like MS Word or WordPad. The following is a description of what is stored in the file:

Line NumberDescription Example
Line 1 Transaction Field that links to customerTrans Customer Link =INVHEADER.CUSTOMER.
Line 2 Transaction Field that links to Salesman FileTrans Sman Link =INVHEADER.SALESPER.
Line 3 Transaction Date FieldrTrans Date =INVHEADER.TRANDATE.
Line 4 Transaction Header to Line item Linking statementTrans Inv No =INVHEAD.INVNO=INVLINE.INVNO
Line 5 Transaction Field that links to Product FileTrans Prod Link =INVLINE.ITEM.
Line 6 Transaction Value FieldTrans Value =INVLINE.FAMTSALES.
Line 7 Transaction Cost FieldTrans Cost =INVLINE.COSTSALES.
Line 8 Transaction Units FieldTrans Units =INVLINE.QTYSOLD.
Line 9 Product Code field (must match transaction field)Prod Link =ICITEM.ITEMNO.
Line 10 Product Description fieldProd Name =ICITEM.DESC.
Line 11 Product Value Field (not required)Prod Value =ICITEM.SALEPRICE
Line 12 Product Cost Field (not required)Prod Cost =ICITEM.COST
Line 13 1st Product Category FieldProd Cat1 =ICITEM.CATEGORY.
Line 14 2nd Product Category FieldProd Cat2 =ICITEM.ALTSET.
Line 15 Customer Code field (must match transaction field)Cust Link =ARCUS.IDCUST.
Line 16 Customer Name fieldCust Name =ARCUS.TEXTSNAM.
Line 17 Customer Category 1Cust Cat1 =ARCUS.IDGRP.
Line 18 Customer Category 2Cust Cat2 =ARCUS.CODESTTE.
Line 19 Salesperson Code field (must match transaction field)Sman Link =ARSAP.CODESLSP.
Line 20 Salesperson Name fieldSman Name =ARSAP.NAMEEMPL.
Line 21 Salesperson Category 1Sman Cat2 =ARSAP.BRANCH
Line 22 Salesperson Category 2Sman Cat1 =ARSAP.DEPT
Line 23 Product Selection StatementProd SQL =SELECT DISTINCT ICITEM.ITEMNO AS CID, ICITEM."DESC" AS CNAME, ICITEM.CATEGORY AS PCAT1, ICITEM.ALTSET AS PCAT2 FROM ICITEM ICITEM.
Line 24 Customer Selection statementCust SQL =SELECT DISTINCT ARCUS.IDCUST AS CID, ARCUS.TEXTSNAM AS CNAME, ARCUS.IDGRP AS CCAT1, ARCUS.CODESTTE AS CCAT2 FROM ARCUS ARCUS.
Line 25 Salesman selection statementSman SQL =SELECT DISTINCT ARSAP.CODESLSP AS CID, ARSAP.NAMEEMPL AS CNAME FROM ARSAP ARSAP.
Line 26 Transaction selection statementTran SQL =SELECT INVHEADER.CUSTOMER AS CCUSTID, INVHEADER.SALESPER AS CSMANID, INVHEADER.TRANDATE AS DTRANDATE, INVHEADER.ITEM AS CPRODID, INVLINE.FAMTSALES AS NVALUE, INVLINE.QTYSOLD AS NUNITS, INVLINE.FCSTSALES AS NCOST FROM INVLINE INVLINE, INVHEADER INVHEADER WHERE INVLINE.INVNO=INVHEADER.INVNO
Line 27 Special date format selection (can be left blank for standard MS ODBC Date formats)Dates ={ACCPAC}{Timestamp}
Line 28 Product DescriptionDesc1 =Products
Line 29Customer Description Desc2 =Clients
Line 30 Sales Person DescriptionDesc3 =Branches
Line 31 Product Category1 DescriptionDesc4 = Type
Line 32 Customer Category1 DescriptionDesc5 =Region
Line 33 Sales Person Category1 DescriptionDesc6 =Type
Line 34 Product Category2 DescriptionDesc7 =Location
Line 35 Customer Category2 DescriptionDesc8 =Status
Line 36 Sales Person Category2 DescriptionDesc9 =State
Line 37 Tooltip text on Button rolloverTooltip =Imports from Accpac Advantage Series


Copyright Infyra Pty Ltd