North Carolina surplus lines filings
Insurance United States
Checks a surplus lines brokerage’s batch of policy transactions before it’s sent to the North Carolina Surplus Lines Association, then sums its premium and fees by transaction type, coverage code and tax status: every transaction against the fields and business rules of NCSLA’s batch upload guide, and every backout, reinstatement and likely duplicate against what the brokerage has already filed.
From the North Carolina Surplus Lines Association’s Agent Batch Upload Guide, updated May 2025, and its current coverage and tax status codes.
- 42validation rules
- 21pipeline stages
- 20agent schema fields
- 3 minto build and check
See it in Quantemplate
The pipeline

The validations

Premium by coverage

What it checks
42 rules 35 Fail 7 Warning
- Brokerage and brokerThe brokerage’s licence number and name, and the broker’s licence number 3 Fail 3
- PolicyThe policy number, expiration date, insured’s name, ZIP code, risk purchasing group and comment, and one expiration date for each policy in the batch 7 Fail 7
- TransactionTransaction ID, coverage code, tax status and transaction type, effective and issue dates, premium and fee amounts, the insurer’s name and NAIC number, rows of a transaction that agree, and each insurer once 13 Fail 13
- Amounts and dates by typePositive or negative premium and fees for each transaction type, a cancellation’s amounts and expiration date, and the effective date within the policy term 5 Fail, 1 Warning 6
- Tax statusNon-taxable coverage only on commercial aircraft codes, non-taxable ocean marine only on ocean marine codes, ocean marine codes that are never taxable, and statuses that need the Department of Insurance’s approval 0 Fail, 4 Warning 4
- Backouts, reinstatements and duplicatesA backout matching a filed transaction once, no duplicates, a reinstatement after a filed cancellation of the same coverage and insurer and dated after it, nothing filed between the two, and backing out a reinstatement only while it’s the last transaction 7 Fail, 1 Warning 8
- Filing deadlineNew business and renewals sent within 30 days of the effective date 0 Fail, 1 Warning 1
A rule set to Fail marks its rows as failed, and any failure blocks Auto Export if you set it up. Warnings are only reported. Validation never removes a row. Every rule and its formula is listed in VALIDATIONS.md in the download.
How the pipeline works
- Stages 1–2 Prepare this batch and previous filings Detect headers, tidy each file (trim, collapse spaces and upper-case) and mark where each row came from
- Stage 3 Batch and previous filings Stack the two files
- Stage 4 Transaction keys Set the batch date, work out each date’s year, month, day and day number, and key each row by its policy and transaction details, its coverage and insurer, and its transaction ID
- Stages 5–7 Matching transactions Count the filed and batch originals and backouts with the same policy and transaction details, join the counts to each row, and find the filed transactions that haven’t been backed out
- Stages 8–11 Policies, covers, versions and insurers Each policy’s last filed transaction and cancellation, and its dates in the batch, each coverage and insurer’s last filed transaction, the versions of each transaction’s rows, and the rows for each insurer
- Stages 12–15 Joins Join all four to each row
- Stage 16 Check this batch Remove the previous filings, turn blank counts into 0, label the transaction type, tax status and coverage, and run the rules
- Stages 17–18 Batch checked and transactions The checked batch, and one row for each transaction with its insurers counted
- Stages 19–21 Totals Count the transactions and add up the premium and company fees by transaction type, coverage code and tax status
What’s in the download
- The 42 rules as JSON, and a table of every rule with its formula and why
- Good data for a fictional Raleigh brokerage’s batch of 12 transactions and the 13 it filed before, from new business shared by a US insurer and a Lloyd’s syndicate to a renewal, a cancellation, a reinstatement after non-payment, backouts of filings made in error, and non-taxable ocean marine and aircraft cover, and test files with a filing built to fail each rule
- The number of rows each rule should flag on the test files, and the transactions and totals the good data should give
- A template file the Quantemplate build skill reads to build the pipeline and check the results
- A snapshot of the finished pipeline
The guide isn’t included. Download the Agent Batch Upload Guide from NCSLA, with its current coverage codes and tax status codes.
Build it
- Install the Quantemplate skills, version 1.0.0 or later, if you haven’t already. Then unzip the download.
- With Claude in Chrome signed in to Quantemplate, ask Claude Code:
Build the North Carolina surplus lines filings pipeline from the nc-surplus-lines-filings folder.
- Claude creates the datasets and stages, runs the test data and checks every rule’s result. This takes around 3 minutes.
The agent builds through the Quantemplate app’s own API in your browser. That API isn’t published, so if a release changes it, the build stops and tells you what went wrong. Review what the agent builds before you rely on it.
Using a real batch
- Export the batch as one CSV file, with one row for each transaction and insurer. Use the guide’s field names as column names, such as
Transaction TypeandInsurer NAIC Number. The header row of the test data in the download lists them all. - Export the transactions you’ve already filed on the same policies as a second CSV file in the same layout, back to each policy’s new business or renewal. The pipeline needs them to check backouts, reinstatements and duplicates.
- Give a transaction shared by several insurers one row for each insurer, with the same transaction ID and that insurer’s share of the premium and fee.
- Give dates as yyyymmdd and amounts in dollars and cents. Use NCSLA’s current coverage and tax status codes.
- Change
Batch Datein stage 4, Transaction keys, to the day you’ll send the batch. The template is set up for a batch sent on 4 December 2026. - Choose the batch in stage 1, Prepare this batch, and the previous filings in stage 2, Prepare previous filings, in place of the test files. Or give each file the name of the one it replaces: an upload with the same name replaces it, and the stage keeps using it.
- Correct anything a Fail rule flags, and check the warnings. Then make the XML file from the checked batch and send it through SLIP.
Contact the Quantemplate support team, or use your AI agent, to build custom logic for your use case.
Limits
- Licences aren’t checked. NCSLA rejects a batch whose brokerage or brokers aren’t registered and active, but the pipeline can’t see the register, so it only checks the licence numbers’ lengths.
- It doesn’t make or check the XML file. The rules follow the guide’s field lengths and business rules, not the XML schema, which NCSLA gives on request. Validate your file against the schema before you send it.
- It’s for North Carolina only. Each stamping office has its own transaction file, and other states’ coverage codes, tax statuses and deadlines differ.
- The cancellation a reinstatement follows must have been filed in an earlier batch, not in the same one.
- Purchasing groups and independent procurement are filed with the North Carolina Department of Insurance, not through SLIP.
- Dates are yyyymmdd, where the XML file uses YYYY-MM-DD. Change them when you make the file.
- The test data is fictional.
- The build doesn’t set up Auto Run, Auto Export or feeds.
- The agent works through the app in your browser, so changes someone makes in the app whilst it’s working can trip it up.