IT3(c) capital gains and losses data for SARS
Finance and banking South Africa
Checks a South African financial institution’s IT3(c) capital gains and losses data against SARS’s requirements before it’s submitted: every field of the three record types, and that account holders, partners and financial data link up.
From SARS’s business requirements specification for IT3 data submission, version 4.0.0D-10
- 69validation rules
- 12pipeline stages
- 73fields checked
- 3 minto build and check
See it in Quantemplate
The pipeline

The checks

The checked financial data

What it checks
69 rules 62 Fail 7 Warning
- Account holdersRecord and FICA status, names, ID numbers with the South African ID and company registration checks, tax numbers, dates of birth, tax residence, addresses, contact details, lengths and characters, and that each partnership has a partner 25 Fail, 3 Warning 28
- PartnersThe account holder rules for each partner, and that each belongs to an account holder 20 Fail, 3 Warning 23
- Financial dataSource codes, asset descriptions, account numbers and types, units sold and held, base cost, proceeds, gain or loss and the value of the units held, and that the gain or loss matches the proceeds less the base cost 16 Fail, 1 Warning 17
- Unique numbersEach unique number appears once in its file 1 Fail 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 is listed in plain English in it3c-validations.txt in the download.
How the pipeline works
- Stages 1–3 Prepare Clean each of the three files, put codes in upper case and add the columns the checks need, such as ID and tax number check digits
- Stages 4–5 Counts Stack the three files and count each account holder’s records, partners and FICA status
- Stages 6–7 Account holders Add the counts to each holder, then run the 28 holder rules
- Stages 8–11 Linked records Join partners and financial data to their holders, then check each
- Stage 12 Unique numbers Count the records with each unique number and check it appears once in its file
What’s in the download
- The 69 rules in plain English, and the definition of every stage and rule
- SARS’s codes for natures of person, gain and loss sources, account types, countries and ID types, from the specification’s appendices
- Account holders, partners and financial data for a fictional unit trust manager, clean and with records built to fail each rule
- The rules each broken record should fail
- A template file the Quantemplate build skill reads to build the pipeline and check the results
- A snapshot of the finished pipeline
The specification isn’t included. Download it from SARS’s IT3 data submission page.
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 SARS IT3(c) capital gains data pipeline from the sars-it3c folder. Test it with the broken and clean files and compare the results with the expected ones.
- Claude creates the pipeline, uploads the three test files, builds the 12 stages and checks both sets of test files. 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 your own IT3(c) data
- Give each of the three record types its own file, with the same columns as the test files: account holders, partners and financial data.
- Start each row with its Record Status and Unique Number, and give every record its account holder’s I3C Unique Number.
- Use the codes in SARS’s specification: natures of person from Appendix A, source codes from Appendix C, account types from Appendix E, countries from Appendix F and ID types from Appendix G.
- Give units with up to 6 decimal places and amounts in rand with up to 2. Balance of Units and its value are as at the last day of February.
- Give each instrument a financial record with its gain or loss code, 4250 to 4253, and report any foreign tax credit on a foreign gain as its own record with source code 4114.
- The 6 account holder and partner warnings are for fields SARS accepts a file without but reports on. The financial data warning is Quantemplate’s own check that Gain or Loss is the difference between Proceeds and Base Cost. None of them block Auto Export.
- The checked records are ready for a tool that writes SARS’s pipe-separated submission file. Leave out the columns the checks add, such as Text Fields, SA ID Check and Gain Zero.
Contact the Quantemplate support team, or use your AI agent, to build custom logic for your use case.
Limits
- The rules are written from version 4.0.0D-10 of SARS’s specification. Review them against your own reading, and check for later versions.
- It checks IT3(c) records only. IT3(b) has its own template, and IT3(d), IT3(e) and IT3(s) aren’t covered.
- The submission’s header, submitting entity and trailer aren’t checked, including the trailer’s sum of the amounts, and nor are dates of birth against today.
- Free text is checked for Latin-1 characters with no pipe, not against the specification’s narrower list for each field.
- Amounts are checked as numbers with 2 decimal places at most, and units with 6. The tool that writes the submission file must write exactly two and six, with no leading zeros.
- Codes compare as numbers, so 001 and 1 are the same ID type. The tool that writes the submission file must pad them.
- Company registration numbers are accepted with any year from 1800, so a future year isn’t caught.
- The specification’s note that a partner’s ID number has no special characters isn’t checked, because registration numbers contain a slash.
- It doesn’t write the submission file or send it to SARS.
- The unit trust manager, its customers and its funds are made up.
- 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.