Closed HRAGANBC closed 2 months ago
@HRAGANBC we should review this and then take it to grooming
@andrewsignori-aot
Upon student creation, create a new entry in the sims.cas_suppliers and have it associated with a new column in sims.students.cas_supplier_id table. This would follow the same idea from sims.sin_validations and sims.students.sin_validation_id.
, why are we creating an entry if the student is not validated for sin and on creation?Pending address verification
status in the enum.Edit Info
is added for a particular student only SupplierNumber
and SiteCode
information is populated? What other information has to be updated in the sims.cas_suppliers table other than the supplier_status as Verified manually?@andrewsignori-aot
- the understanding on
Upon student creation, create a new entry in the sims.cas_suppliers and have it associated with a new column in sims.students.cas_supplier_id table. This would follow the same idea from sims.sin_validations and sims.students.sin_validation_id.
, why are we creating an entry if the student is not validated for sin and on creation?- On displaying the table cas_suppliers UI in the ministry portal, the line items for the suppliers for a particular student has to be fetched from this table cas_suppliers. Without the relation of student_id in the table how we could display muliple rows?
- Reason for having
Pending address verification
status in the enum.- What will be the enum status if the CAS call is failure or no response is returned.
- When a manual
Edit Info
is added for a particular student onlySupplierNumber
andSiteCode
information is populated? What other information has to be updated in the sims.cas_suppliers table other than the supplier_status as Verified manually?- Efforts on configuration for cas api, like the URL endpoint, authentication parameters in our project is not captured. Do we need it initially as a first effort and from there create the table for cas_suppliers as subsequent efforts?
Pending address verification
is reserved for future use when students update their profiles and we need to communicate CAS. It is not part of this ticket and it can be added later if the Team is not willing to have it added now.@HRAGANBC @sslaws @JasonCTang
I have some questions I couldn't find in the documentation or ACs:
isValid
to true for a supplier? Should it just set isValid
to true if there's a response for the request?@andrepestana-aot
Can a supplier response have more that one "item"? If so, should we ignore the rest?
My understanding is that you can only have one item, but Nino has asked CAS for confirmation
Is it possible that a supplier does not have an address? What to do if so?
My understanding is that is not possible, but Nino has asked CAS for confirmation
What's criteria to set isValid to true for a supplier? Should it just set isValid to true if there's a response for the request?
My understanding is that is a variable we define ourselves to reflect whether or not SIMS has all the information it needs from CAS transactions. We set isValid
= true when:
@ninosamson @sslaws FYI
Hi @andrepestana-aot.
Confirming that all suppliers MUST have an address as per minimum requirement on creation.
@ninosamson Could you confirm if the lastname
for the request should be all in upper case, please?. In my tests I had different results with upper and lower cases.
From the documentation @andrepestana-aot
User Story: SIMS must record and maintain a student's 'supplier' information as part of their profile, so that a student's SIMS profile can match with their corresponding account in the Corporate Accounting System (CAS), and SIMS can relay critical information about that student to CAS.
Acceptance Criteria:
Initiate 'Get Supplier' Process
Last Name
andSIN
SupplierNumber
SupplierName
status
Supplier protected
lastupdated
And from withinSupplier Address
suppliersitecode
Addressline1
City
Province
country
postalcode
status
siteprotected
lastupdated
Technical
sims.cas_suppliers
. In the future, we will have a new table for invoices that we may call sims.cas_invoices.id
SERIAL PRIMARY KEY: Auto-generated sequential primary key column.supplier_number
VARCHAR(100) NULL: Supplier number received from CAS.null
when no data was ever retrieved from CAS.supplier_name
VARCHAR(100) NULL: Supplier name received from CAS.null
when no data was ever retrieved from CAS.status
VARCHAR(50) NULL: Supplier status received from CAS.null
when no data was ever retrieved from CAS.supplier_protected
BOOLEAN NULL: Protected flag received from CAS which means the student profile was created by SFAS and therefore no system other than SFAS can change it.null
when no data was ever retrieved from CAS.last_updated
TIMESTAMP WITH TIME ZONE NULL. Date and time of the last update.null
when no data was ever retrieved from CAS.supplier_address
: JSONB. Supplier address from the CAS integrations. When multiple exists, only the active one should be saved. We will not be saving the array received at this moment, only a single entry from the received list should be persisted as JSONB. The JSONB should be mapped as below respecting the case to follow the SIMS pattern. Keep the datatypes as received from CAS.supplier_status
ENUM (Pending supplier verification
,Pending address verification
,Verified
,Verified manually
) NOT NULL. Indicates if the system should execute verification in the record calling some of the CAS integrations; if the record represents manual entry and no actions are needed; or if no further verifications are needed.supplier_status_updated_on
TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW. Date when the column supplier_status was updated.is_valid
BOOLEAN NOT NULL DEFAULT false: Indicates when the supplier is considered valid and an invoice can be generated using the information.sims.cas_suppliers
and have it associated with a new column insims.students.cas_supplier_id
table. This would follow the same idea fromsims.sin_validations
andsims.students.sin_validation_id
.cas-supplier-integration
to execute the CAS requests to try to get the supplier.sims.sin_validations.valid_sin
istrue
).is_valid
is nottrue
andsupplier_status
isPending supplier verification
(other enum types are reserved for future use).Verified
and update thesupplier_status_updated_on
.https://<webserviceURL>:<port>/ords/cas/cfs/supplier/{lastname}/lastname/{sin}/sin
.Client ID
andClient Secret
.Technical Context:
Question: Should the auth token be stored in Redis as we know how long the token is valid for?
Stephen or Jason to supply required connection information (.env)
Sample Code
Mock-Ups
Fig 2 - Success Response Format for Get Supplier Number Process
Doc 1 Supplier Web Service RESTful Client Onboarding v02_01.pdf
Doc 2: Individual Supplier Web Service Field Requirements (All Requests) JAN2023.xlsx