Skip to main content

Import External SMR Codes file

Some customers utilize back-office solutions that rely on external job codes. So in order to prevent the invoices from being rejected it is essential to include these external codes in the invoice details sent from ViSN.

Fields

Field NameDescriptionData typeValidationMax lengthMandatoryExample
Job CodeViSN/ Haynes Pro codesStringA-Z a-z & 0-920Yes1A00039950WV0
External CodeExternal codesNumber0-95Yes65

Importing a file

Preparation

  1. Create a new branch with Jira task number in the branch name

  2. Delete all the files in importFiles folder

  3. Create a folder with the current sprint number

  4. Copy the file that needs to be imported

  5. Go to package.json , find the line validate:externalSMRCodes

  6. Modify --file with the relative path of the file

  7. Save package.json

Validating locally

  1. In a terminal run npm run validate:externalSMRCodes

  2. If there are no errors, push the code

Validating in workflow

  1. Go to Action of Import-manger

  2. Find <Environment> - on-demand-import

  3. Select the branch that was created for this import

  4. Enter script name as validate:externalSMRCodes

  5. Leave Overrides empty

Importing the file

  1. If the validation has passed

  2. Go to Action of Import-manger

  3. Find <Environment> - on-demand-import

  4. Select the branch that was created for this import

  5. Enter script name as import:externalSMRCodes

  6. Enter --persist in Overrides field

Testing

  1. The glass job descriptions will be stored in Firestore, under /config/lookUp/externalSMRCodes/.

  2. The imported smr codes for the job descriptions should be exported into the daily invoice export csv.

Status: Accepted
Category: Protected
Authored By: Rama on Dec 06, 2024