Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CAS Invoicing - Send Invoices to CAS and Record Response #4330

Open
1 of 17 tasks
CarlyCotton opened this issue Feb 7, 2025 · 0 comments
Open
1 of 17 tasks

CAS Invoicing - Send Invoices to CAS and Record Response #4330

CarlyCotton opened this issue Feb 7, 2025 · 0 comments
Assignees

Comments

@CarlyCotton
Copy link
Collaborator

CarlyCotton commented Feb 7, 2025

User Story
After a ministry user approves a batch to be sent to CAS for invoicing, we need to send the invoices (and their detail records) to CAS via the API during the next available open window. This should also include any invoices we have previously received an error response for and a user has selected 'Retry'.

Acceptance Criteria

  • Create process to send invoices to CAS via the API in the next available window

  • Invoices to send to CAS: in an approved batch that have not already been sent;

  • Update the status if response is error: Manual Intervention (to avoid retrying - any technical error should be retried)

  • Save any Manual Intervention error messages received for the invoice (do not save any technical errors)

  • Update Distribution Accounts to be used in TEST & STAGING (doesn't matter which award CR or DR each one goes to):

019.11215.18150.5185.1100000.000000.0000
019.11OCG.00000.1034.1100000.000000.0000
019.11110.18150.5001.1100000.000000.0000
019.11OCG.00000.4612.1100000.000000.0000
019.65OCG.00000.3990.6500000.000000.0000
019.11OCG.00000.3451.1100000.000000.0000
019.11OCG.00000.3463.1100000.000000.0000
019.11225.18150.5298.1100000.000000.0000
019.11215.18200.6508.1100000.000000.0000
019.11220.18632.7701.1100000.000000.0000
  • Update Distribution Accounts to be used in DEV (doesn't matter which award CR or DR each one goes to):
019.11020.18150.5108.1100000.000000.0000
019.11020.18150.5185.1100000.000000.0000
019.11225.18150.5298.1100000.000000.0000
019.11OCG.00000.3451.1100000.000000.0000
019.11OCG.00000.3458.1100000.000000.0000
019.11OCG.00000.3463.1100000.000000.0000
019.11OCG.00000.3003.1100000.000000.0000
019.11020.18150.5010.1100000.000000.0000
019.11OCG.00000.1821.1100000.000000.0000
019.11OCG.00000.1046.1100000.000000.0000

Additional Context
CAS Files for Response Message and Payload Examples
-- carly to provide easier text for dist accts.

Technical

  • Create release instructions to update sims.cas_distribution_accounts for DEV/TEST/STAGING assigning the provided values from the business.
  • Call CAS endpoint under the existing CAS API service.
    • Set the invoice status to Sent when a successful HTTP status is returned.
    • Set the invoice status to Manual intervention when a BAD_REQUEST is returned following the same idea from CAS Supplier.
    • Other errors should leave the record status as pending to allow it to be retried.
  • Create a scheduler to be executed three times a day with a hard limit to how many records will be selected following the same idea from the notifications.
    • Select all pending invoices under an approved batch.
    • Execute the CAS API calls with a limit of two max parallel operations (default configuration).
    • When a call fails, add an error to the process summary to allow the scheduler to retry.
  • E2E tests for the new scheduler.
  • Unit tests for the new API call following the ones already in place.
@CarlyCotton CarlyCotton added the Business Items under Business Consideration label Feb 7, 2025
@CarlyCotton CarlyCotton changed the title CAS Invoicing - Send Approved Batch of Invoices CAS Invoicing - Send Invoices to CAS and Record Response Feb 7, 2025
@CarlyCotton CarlyCotton self-assigned this Feb 7, 2025
@CarlyCotton CarlyCotton added this to the Full-Time "Asset" milestone Feb 7, 2025
@CarlyCotton CarlyCotton added Dev & Architecture Development and Architecture and removed Business Items under Business Consideration labels Feb 11, 2025
@andrewsignori-aot andrewsignori-aot removed the Dev & Architecture Development and Architecture label Feb 11, 2025
@guru-aot guru-aot self-assigned this Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants