Importing Sales to CamoAg
Overview
The CamoAg platform supports importing sales from AgWare Datalog, mapped to farm sales within the CamoAg platform. The CamoAg platform relies on a standard AgWare stored procedure to generate an XML file for each relevant sale record in UAAR format (AgWare XML spec format). This stored procedure is made available as part of the AgWare software release.Before you start
Setting up the integration is mostly a conversation between your IT team and CamoAg. The steps below are in the order they need to happen — step 2 in particular is easy to skip and expensive to skip.CamoAg provisions your S3 drop location
Send CamoAg your DataLog land quality type list
LandQualityTypeName on each sale. This list is specific to your organization.CamoAg maps each land quality type to a CamoAg acreage type
Configure the stored procedure and the file drop
GetSaleXML to run on a schedule (typically once daily, covering sales changed in the last 24 hours) and writes the resulting files to the S3 bucket. Filter out sales you do not want in CamoAg at this stage — see Sales that should not be sent.Set up a second, parallel export for deleted and withdrawn sales at the same time. GetSaleXML does not produce delete files — see Deleting farm sales.Send a small batch first
Attributes
Each file describes a single sale. The following attributes are read from theUaarSale element.
Required — the file is rejected if any of these are missing or invalid:
SaleLandTotals, SaleIncome, SaleExpense, SaleAttachment, SalePhotoPage, SaleRating and so on — are accepted and ignored. There is no need to strip them out of the export.
Land types and acreage mapping
This is the most important configuration step in the integration, and the one most worth getting right before the first real file arrives. AgWare land quality types are free-form and specific to each organization’s DataLog configuration. CamoAg has a fixed set of nine acreage types. EverySaleLandDeeded row on a sale carries a LandQualityTypeName, and CamoAg needs to know which acreage type each of your names corresponds to.
The nine CamoAg acreage types are:
- Matching is exact and case-sensitive.
CRPandCRP Landare two separate entries in the mapping, and both need to be configured if both appear in your data. - Several AgWare types can map to one CamoAg type. Their acres are summed. In the example above, four
Croplandgrades combine into a singledryland_acresfigure. - A
SaleLandDeededrow with noAcresattribute is skipped. These occur in real exports, usually as header or subtotal rows.
Integration
CamoAg uses AWS (Amazon Web Services) S3 as its preferred way to share these files and can make available for customers a limited permission AWS IAM user with access to write to a reserved AWS S3 bucket each UAAR sale data XML format. These files are treated as upserts (SaleIndex used as a unique identifier), imported once daily, for sales data private to a customer organization. DataLog ships with a stored procedure, titled “GetSaleXML” that can generate the UAAR XML format consumed by CamoAg. Customers would need to define a process where this can be called to generate the XML files and send them to Amazon S3. Practical details for whoever configures the drop:- Where files go: the
agware_data/folder at the root of your organization’s S3 path. Files in subfolders are not picked up. - Accepted file extensions:
.xml,.uaar-saleand.uaar-deleted. Any other extension is ignored. - One sale per file. A file containing more than one
UaarSaleelement is rejected. A file containing none is treated as processed and discarded. - Filenames are up to you. CamoAg identifies sales by
SaleIndexand detects deletes from the file contents, not the filename. Using the sale index in the name makes troubleshooting easier. - Import runs once daily. Files dropped during the day are picked up on the next run.
- Processed files are moved out of the drop folder into a
processed/location after import, so the same file is not imported twice. Your CamoAg contact can restore a file from there to re-run it.
Sample UAAR sale file
The following is a synthetic example showing the structure CamoAg consumes. Values are illustrative; your export will contain considerably more attributes, which is expected.Deleting farm sales
CamoAg supports AgWare sales being deleted from the DataLog system. To remove a sale, send CamoAg a stripped-down XML file with the SaleId and SaleIndex of the sale, along with a flag indicating that the sale has been deleted. The following is an example of the XML format for a deleted sale:AgWareSale element carries IsDeleted="1" — the filename and extension do not matter. Deleting a sale removes the corresponding farm sale and farm from CamoAg. If CamoAg receives a delete for a sale it does not have, the delete is logged and ignored, so sending extra deletes does no harm.
Delete files need their own export
Run a separate export alongside the daily sales export that finds deleted sales and writes one delete file per sale to the sameagware_data/ folder.
Withdrawn and canceled sales
Treat sales that are withdrawn or canceled in DataLog the same way as deleted ones. A sale that reached loan documents and was then withdrawn is not a valid comp, but it stays in CamoAg until a delete is sent for it. Have your delete export pick up sales that are deleted, withdrawn or canceled.Cleaning up historical deletes
If you loaded historical sales into CamoAg, sales deleted or withdrawn in DataLog since then are probably still in CamoAg. To clean them up:- Get the daily delete export running first, so new deletes are handled going forward.
- Then run the delete export once over the same history window you used for the original historical sales load.
Sales that should not be sent
CamoAg imports every sale it receives. It does not apply an arms-length test, an outlier check, or any other quality filter, and it does not read the AgWareMotivation attribute.
If your organization flags non-arms-length transactions, outliers, or otherwise unreliable comps in DataLog, exclude those sales in the stored procedure or in the process that writes files to S3. Anything that reaches the bucket becomes part of your comp set in CamoAg.
The upside of filtering upstream is that CamoAg becomes a clean, pre-verified view of your sales — loan officers and CMA authors can trust what they see without re-checking each comp.
Troubleshooting
Import errors are recorded in your organization’s import log; your CamoAg contact can review them with you.The file was rejected — a required attribute is missing
The file was rejected — a required attribute is missing
SaleIndex, DeededAcres, SalePrice, CountyCode, a state, and a sale date are all required. Check that the stored procedure is populating them for the sale in question.The file was rejected — county code does not match the state
The file was rejected — county code does not match the state
CountyCode is a 3-digit county FIPS code and must be valid for the sale’s state. A mismatch usually means the state and county fields came from different records.The file was rejected — a parcel is missing acres
The file was rejected — a parcel is missing acres
SaleApn in the file must have both ParcelNumber and Acres. A single parcel missing Acres rejects the entire file, not just that parcel.The file was rejected — more than one sale in the file
The file was rejected — more than one sale in the file
UaarSale. If your export batches sales, split it into one file per sale.The file was rejected — sale date is in the future
The file was rejected — sale date is in the future
The file was rejected — percent tillable is out of range
The file was rejected — percent tillable is out of range
The file was rejected — acreage does not match the parcel boundaries
The file was rejected — acreage does not match the parcel boundaries
The sale imported but no comp appears in CamoAg
The sale imported but no comp appears in CamoAg
SaleMap coordinates and no usable PLSS section, the sale record is stored but no farm sale is created. Adding Lat / Long to the export resolves this.A sale deleted or withdrawn in DataLog still appears in CamoAg
A sale deleted or withdrawn in DataLog still appears in CamoAg
SaleIndex. Check that your delete export is running, that it covers withdrawn and canceled sales, and that it was updated for Maven’s move to temporal tables. See Deleting farm sales.The same sale appears twice in CamoAg
The same sale appears twice in CamoAg
SaleIndex. CamoAg matches sales only on SaleIndex, so send a delete file for the old index.The comp imported but the acres look wrong
The comp imported but the acres look wrong

