Skip to content

[SPIKE] Resolve/reduce issues with missing BN numbers for firms #31115

Closed

Description

@OlgaPotiagalova

Referenced RAID ticket https://app.zenhub.com/workspaces/raid--work-space-617c3d4cef313f001d715a7c/issues/gh/bcgov-registries/raid/731

There are total ~83,000 firms created since Oct 2022 when BN Hub was released
79,435 firms have BN15 assigned, and 4,407 firms have it missing

In most cases, there is no issue with receiving BN in real time, provided that the integration with CRA is healthy and the data required by CRA to generate BN15 is sufficient.

Scenarios Resulting in Failure to Receive a BN Number

  1. BN numbers are assigned by the CRA only during business hours. It’s unclear whether this was considered when the logic was implemented.
  2. Unhealthy communication with CRA For example, when CRA services are down or responding slowly.
  3. Specific filings that require additional processing time by CRA to assign a BN (e.g., amalgamation cases).
  4. Rejection from CRA to generate BN15 because the firm’s data does not meet CRA’s validation criteria. The current process is handled by IT Operations, which adjusts the data using another tool connected to CRA.

Goals:

  1. Finding a way to backfill missing BN15 for firms
  2. Alleviating the problem to improve current behavior for firms (for example, add additional daily retries without added stress on the system)
  3. In addition, evaluating if it will be feasible to utilize current method for corps if 1 and 2 are addressed, or replacing it with CRA API is needed. (for the time being there is a different mechanism used for corps through sync with COLIN)

Next step:
Conduct a meeting with IT Ops team to better understand scenarios, workflows, and possible solutions

Activity

  1. added
    Entities Team
    on Oct 31, 2025
  2. OlgaPotiagalova commented on Nov 3, 2025

    @OlgaPotiagalova
    CollaboratorAuthor

    As per meeting on Nov 3, 2025

    Goal 1 - Finding a way to backfill missing BN15 for firms - please refer to the https://sbc-registries.atlassian.net/browse/ITOPS-209960. Jay will fix all the silent failures and will bring the data up-to-date.

  3. OlgaPotiagalova commented on Nov 3, 2025

    @OlgaPotiagalova
    CollaboratorAuthor

    @vysakh-menon-aot, could you please estimate effort for the goal 2 above. Thank you.

  4. vysakh-menon-aot commented on Nov 20, 2025

    @vysakh-menon-aot
    Contributor

    @OlgaPotiagalova @argush3 @thorwolpert

    Spike: Reduce missing BN15 for firms due to limited retries

    Overview

    Purpose: Evaluate and prototype approaches to reduce missing BN15 values for firms when CRA delays to provide it with in the retry window and the current retry window (9 retries ≈ 40 minutes approx.) is insufficient.

    Deliverable: A decision-backed prototype (daily reconciliation job) including required changes and an implementation plan.

    Current limitations

    • Firm registration
      • If BN Hub acknowledges the message: LEAR polls BNI DB via COLIN (max 9 retries).
        • If CRA rejects the registration, LEAR will never know and will not receive BN15 (Details of CRA response available only in BN Hub).
      • If BN Hub rejects the message: LEAR retries up to 9 times.
    • Firm changes (name/status/address/proprietor/partner)
      • If BN Hub acknowledges the message: no retry (silent failures if CRA rejects).
      • If BN Hub rejects: LEAR retries up to 9 times.
    • IT/Ops
      • If BN15 arrives after max retries, manual DB update is required.
      • CRA rejections require investigation and corrective action.

    Options

    1. Daily reconciliation job (recommended prototype)

      • Re-query BNI DB via COLIN for records missing BN15.
      • Low engineering cost, delayed resolution (daily), reduces backlog.
    2. Become a BN Hub partner

      • Potential to receive late BN15 updates (days/weeks).
      • Requires a lot of changes, longer coordination and cost.
    3. Long-term: Use new CRA REST API

      • Out of scope for now.

    Scope (Option 1)

    In-scope:

    • Implement daily reconciliation job to retrieve BN15 from BNI DB.

    Out-of-scope:

    • Retry to send messages to BN Hub after max retry
      • BN Hub rejects request
      • BN Hub is not available

    Implementation plan

    • Create a job business-bn-retry to run every day morning 6AM (PST)
      • Create an endpoint in colin-api to query if BNI DB received BN15 for a list of identifiers
      • Implement the BN15 check for all firms created in LEAR (with a cutoff date or identifier starts with FM1)
      • Once BN15 received
        • Update Lear
        • Send an email to user
        • Publish identifier to BUSINESS_EVENTS_TOPIC (so other things know business has changed)

    Monitoring & alerts

    • Create an email alert to monitor missing BN15
  5. argush3 commented on Nov 24, 2025

    @argush3
    Contributor

    looks good to me

  6. Mihai-QuickSilverDev commented on Dec 5, 2025

    @Mihai-QuickSilverDev
    Collaborator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Entities TeamPriority2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions