💸 Integrate Xero for financial operations.
The "Xero Upsert" allows you to update or create records in your Xero account for various record types.
Info:Before using the "Xero Upsert", ensure that you have configured your Xero organization. Please refer to the Xero page for more information.
Below, you'll find a list of all possible correspondingRecordType options and examples of how to perform an upsert operation.
invoiceitembillcontactpurchaseOrderpaymentcreditNotetrackingOptiontrackingCategorypayrollEmployeepayrollTimesheetmanualJournal
1. Upsert Invoice
Upsert an invoice.
const tenantId = (await C.getCompanySettings()).xeroOrganisation.xeroId;
if (!tenantId) {
throw "Default xero organisation is not set in company settings";
}
const xeroClient = await C.xeroUpsert({
recordId: 591600,
entryId: 698937,
xeroTenantId: tenantId,
correspondingRecordType: "invoice",
xeroEntryData: data,
});2. Upsert Item
Upsert an item.
const tenantId = (await C.getCompanySettings()).xeroOrganisation.xeroId;
if (!tenantId) {
throw "Default xero organisation is not set in company settings";
}
const xeroClient = await C.xeroUpsert({
recordId: 591600,
entryId: 698937,
xeroTenantId: tenantId,
correspondingRecordType: "item",
xeroEntryData: data,
});3. Upsert Bill
Upsert a bill.
const tenantId = (await C.getCompanySettings()).xeroOrganisation.xeroId;
if (!tenantId) {
throw "Default xero organisation is not set in company settings";
}
const xeroClient = await C.xeroUpsert({
recordId: 591600,
entryId: 698937,
xeroTenantId: tenantId,
correspondingRecordType: "bill",
xeroEntryData: data,
});4. Upsert Contact
Upsert a contact.
const tenantId = (await C.getCompanySettings()).xeroOrganisation.xeroId;
if (!tenantId) {
throw "Default xero organisation is not set in company settings";
}
const xeroClient = await C.xeroUpsert({
recordId: 591600,
entryId: 698937,
xeroTenantId: tenantId,
correspondingRecordType: "contact",
xeroEntryData: data,
});5. Upsert Purchase Order
Upsert a purchase order.
const tenantId = (await C.getCompanySettings()).xeroOrganisation.xeroId;
if (!tenantId) {
throw "Default xero organisation is not set in company settings";
}
const xeroClient = await C.xeroUpsert({
recordId: 591600,
entryId: 698937,
xeroTenantId: tenantId,
correspondingRecordType: "purchaseOrder",
xeroEntryData: data,
});6. Upsert Payment
Upsert a payment.
const tenantId = (await C.getCompanySettings()).xeroOrganisation.xeroId;
if (!tenantId) {
throw "Default xero organisation is not set in company settings";
}
const xeroClient = await C.xeroUpsert({
recordId: 591600,
entryId: 698937,
xeroTenantId: tenantId,
correspondingRecordType: "payment",
xeroEntryData: data,
});7. Upsert Credit Note
Upsert a credit note.
const tenantId = (await C.getCompanySettings()).xeroOrganisation.xeroId;
if (!tenantId) {
throw "Default xero organisation is not set in company settings";
}
const xeroClient = await C.xeroUpsert({
recordId: 591600,
entryId: 698937,
xeroTenantId: tenantId,
correspondingRecordType: "creditNote",
xeroEntryData: data,
});8. Upsert Tracking Option
Upsert a tracking option.
const tenantId = (await C.getCompanySettings()).xeroOrganisation.xeroId;
if (!tenantId) {
throw "Default xero organisation is not set in company settings";
}
const xeroClient = await C.xeroUpsert({
recordId: 591600,
entryId: 698937,
xeroTenantId: tenantId,
correspondingRecordType: "trackingOption",
xeroEntryData: data,
});9. Upsert Tracking Category
Upsert a tracking category.
const tenantId = (await C.getCompanySettings()).xeroOrganisation.xeroId;
if (!tenantId) {
throw "Default xero organisation is not set in company settings";
}
const xeroClient = await C.xeroUpsert({
recordId: 591600,
entryId: 698937,
xeroTenantId: tenantId,
correspondingRecordType: "trackingCategory",
xeroEntryData: data,
});10. Upsert Payroll Employee
Upsert a payroll employee.
const tenantId = (await C.getCompanySettings()).xeroOrganisation.xeroId;
if (!tenantId) {
throw "Default xero organisation is not set in company settings";
}
const xeroClient = await C.xeroUpsert({
recordId: 591600,
entryId: 698937,
xeroTenantId: tenantId,
correspondingRecordType: "payrollEmployee",
xeroEntryData: data,
});11. Upsert Payroll Timesheet
Upsert a payroll timesheet.
const tenantId = (await C.getCompanySettings()).xeroOrganisation.xeroId;
if (!tenantId) {
throw "Default xero organisation is not set in company settings";
}
const xeroClient = await C.xeroUpsert({
recordId: 591600,
entryId: 698937,
xeroTenantId: tenantId,
correspondingRecordType: "payrollTimesheet",
xeroEntryData: data,
});12. Upsert Manual Journal
Upsert a manual journal.
const tenantId = (await C.getCompanySettings()).xeroOrganisation.xeroId;
if (!tenantId) {
throw "Default xero organisation is not set in company settings";
}
const xeroClient = await C.xeroUpsert({
recordId: 591600,
entryId: 698937,
xeroTenantId: tenantId,
correspondingRecordType: "manualJournal",
xeroEntryData: data,
});📌 Need Help?
