Design Docs

Jay, Mason, Osung, Logan, Yany, Marco

INTRODUCTION

Our service extract meaningful text from the recieved sales order pdfs,
and call the ERPNext API to store new sales orders in the ERP system.
This documentation is about various system designs of our Sales Order OCR service.

System Overview

Pasted image 20240118232921.png

Architectural Design

Pasted image 20240118232958.png

Data Design

No persistent data used for process

This is because this service processes data entered by the user immediately through API calls. The data used for API calls is ERPNext's Sales Order data.

Interface DESIGN

Pasted image 20240118232627.png

This is client application interface design.
User could scan their order document. And they also could manually modify the scanned information.

Security Design

  • NETWORK SECURITY
    • TLS ENCRYPTION ON BOTH SIDES
  • Others
    • NO PERSONAL INFO INTO PUBLIC APIs

Error Handling

  • fail to create draft
    • type of failure
      • fail to call LLM
        • API authentication failed
        • fail to parse Purchase Order format
      • fail to call ERPNext API
        • API authentication failed
        • required field not found
        • requested item not found
    • how to handle
      1. notify to system manager
      2. modify mail state

Testing

Testing Client Application

  • Test that the user has checked all required fields

Testing ERPNext API

  • Test that API calls including all required fields
  • Test that All the required fields are extracted from the logical flow through OCR and LLM