Skip to content
Back to the app

Object Graph ​

The Object Graph reads the systems you have connected and returns their records as one set of standard objects: parties, invoices, bills, payments, orders, shipments, tickets and documents. Each object says, field by field, which system the value came from and when it was read. Your records are read where they live, each time you ask. They are not copied into CHANGENTS.AI.

The objects follow the format changents.objects/v1.

Object types ​

TypeWhat it isFields
PartyA customer, supplier or other counterpartyname, kind, taxId, email, phone, country
InvoiceA sales invoice: money owed to younumber, party, issueDate, dueDate, currency, subtotal, tax, total, amountDue, status
BillA purchase invoice: money you owesame as Invoice
PaymentMoney received or paidreference, party, date, amount, currency, appliesTo
OrderA sales or purchase ordernumber, party, direction, date, status, total, currency
ShipmentA consignment or container movementreference, containerNo, origin, destination, departure, arrival, status
TicketA service desk ticketnumber, title, status, priority, openedAt, dueAt, assignee
DocumentA file in a document storename, kind, modifiedAt, url

Dates are YYYY-MM-DD. Amounts are numbers in the record's own currency.

Where the objects come from ​

  • Xero: Contacts become Party, sales invoices Invoice, purchase invoices Bill, and Payments and purchase orders become Payment and Order. This works once Xero is connected.
  • Tally: sales and purchase vouchers in the Day Book become Invoice and Bill. This uses the Tally Connector. With a Site Agent that keeps records on your network, Tally is listed as kept on site and is never read by the Object Graph.
  • Your own database: you map a table to a type, as below. The table is read through the read-only SQL connector.

GET /api/v1/objects lists each type, its fields, and which sources are mapped to it and connected.

Map one of your tables ​

Mapping a table needs a signed-in session, not an API key, because it changes what every agent reads.

Here {type} is Party:

http
PUT /api/v1/objects/mappings/{type}
Content-Type: application/json

{
  "table": "ar.customers",
  "key": "cust_id",
  "fields": { "name": "cust_name", "taxId": "uen", "email": "email" }
}
  • Each field names a column, or { "path": "column", "as": "date" | "number" | "abs" | "string" } to convert it.
  • limit caps the rows read (default 1000, at most 5000).
  • GET /api/v1/objects/mappings lists your mappings. DELETE /api/v1/objects/mappings/{id} removes one.

Read objects ​

For parties, {type} is Party:

http
GET /api/v1/objects/{type}
Authorization: Bearer cgnt_sk_...

The response has:

  • objects: each with fields, provenance (per field: source, entity, field, fetchedAt, and any conversion), members (the record ids it joins) and sources;
  • suggestions: records that may be the same, for a person to decide;
  • reads: each source read, with its record count and read time, or the error it returned.

GET /api/v1/objects/{type}/{id} returns one object with its lineage. The id can be the object's own id or any record id it joins. Use ?source=xero to read one source, and ?limit= to cap the objects returned.

An API key needs the objects scope (see Authentication). Reads count against the key's per-minute budget, like every other API.

The same record in two systems ​

Two records are joined into one object automatically only on an exact match:

TypeExact match on
Partytax id, or email
Invoice, Bill, Ordernumber and party
Paymentreference and amount
Shipmentcontainer number, or reference
Ticketnumber
DocumentURL

Values are compared after normalising (case, spaces, punctuation, and company suffixes such as Pte Ltd).

Anything looser is returned as a suggestion and joined only after a person confirms it, for example two customer names that read alike. A signed-in person records the decision:

http
POST /api/v1/objects/links
{ "type": "Party", "a": "xero:Party:c-3", "b": "sql:Party:18", "decision": "same" }

different keeps two records apart, even when they match exactly. Each decision is written to your organisation's audit chain.

Where joined records disagree on a field, the object shows the first source's value and lists the disagreement under conflicts. It never chooses silently.

Caching and No-Retention Mode ​

A read is kept in memory for one minute, so a burst of identical requests does not hit your systems again. It is never written to a database. Under No-Retention Mode the memory cache is not used either, and every request reads the source. The response says which mode applied, in retention.

Current limits ​

  • The Object Graph reads; it does not write back to your systems yet.
  • Changes are read on request: there are no change notifications from the Object Graph yet.
  • The Tally Day Book fields have been tested against a stand-in Tally, not yet a real TallyPrime.
  • Reading your own tables has been tested against a stand-in tool runtime, not yet a real database.

Served from this deployment. No page view leaves it.