Flow - Auto Create Xero Transaction Records

TwixRiva allows you to auto-create Xero Records based on events, using the Process Builder. For Example: If you want to create a Invoice when an opportunity is set to Closed Won, you can set this feature up and it will automatically create a Invoice in Xero from the opportunity and sync it back to Salesforce as well

This feature allows you to create Purchase Orders, Client Invoices, Supplier Invoices.

Steps to perform to set it up:

Step 1 - Identify your source object. Does this object have lines?

Step 2 - On TwixRiva Xero Invoice object, create a lookup field to your source object.
Note: if you already have a lookup as part of the ‘Pre-Fill your Invoice’ guide, you can reuse this one.

Step 3 - Create a new record in the Xero AutoCreate Mapping Custom Metadata Types.(Gear Icon on the right>Setup> Search Custom Metadata in the Quick Find Box on the left>Click on Custom Metadata Types>Manage Records Next to Xero Auto Create Mapping> New )

Below is the screenshot of the Create New Record Screen, where you can specify the details of mapping between your source object and Xero target object

Note: if you wish to ignore a mapping, enter the value [ None ] (Just the 4 letters) or leave it blank.
Practical, especially for the Record Number section.

Step 4 - Create a Process Builder to start on your selected event. The Action needs to be calling the ‘Apex Class’ Push Record To Xero.

 


Below is the description of fields from above for the Source header object and Source Line object.

Xero Mapping Settings:

 

Xero Mapping Settings:

 

Xero Object; This field allows the user to map a source object data to the Xero Object.

 

Document Header:

 

Label: A descriptive label to identify the Data Mapping between a standard or custom object and Xero object. Example, "Invoice - Xero Invoice Map"

Status: This column or literal value represents the status from the source object.

Due Date: This column represents the Due date from the source object. Only Supported for Invoices & Supplier Invoices. The value should be map from a Date or DateTime type field. Literal value is not applicable for this field.

Object API Name: This column represents the parent object (standard or custom) for the source data to map Xero record. This could be for PO, Invoice or Supplier Invoice

Currency Code: This column or literal value represents the currency code from the source object

RecordNumber: This column represents the Unique alpha numeric code identifying from the source object. This is normally map to the Name column. This is map to the Unique alpha numeric code identifying Invoice, Supplier Invoice or Purchase Order in Xero

LineAmountTypes: This column or literal value represents the Line Amount types from the source object. This is how Xero will apply the tax for the line item. Sample values are "Exclusive", "Inclusive", "NoTax"

ContactId: This column represents the account lookup field Id from the source object.

SubTotal: This column represents the sub-total field from the source object. This the total amount excluding taxes

Date: This column represents the Invoice Date or Purchase date from the source object. Literal value is not applicable for this field. The field should be map from a Date or DateTime type field.

TotalTax: This column represents the Total tax amount from the source object. This is the tax value in the total amount.

 

Total: This column represents the total amount from the source object. Total amount is the total inclusive of taxes.

Document Line:

 

Line Relation to Object: This column represents the related child or line object (standard or custom) for the parent object specified in Object API Name field.

Description: This column or literal value represents the description of the line item from the source object.

ItemName: This column or literal value represents the Item Name from the source object. This is the Xero generated The name of the item

AccountCode: This column or literal value represents the accountcode in Xero App.

ItemCode: This column or literal value represents the Item Code from the source object. This is the Xero generated identifier for an item.

 

Quantity: This column represents the LineItem Quantity from the source object. This is the LineItem Quantity. For Purchase Order, If Quantity is specified then a UnitAmount must be specified

 

DiscountRate: This column or literal value represents the discount rate from the source object. This is the Percentage discount being applied to a line item. Only supported on Invoice and PO. Supplier invoices and credit notes in Xero do not support discounts

 

UnitAmount: This column represents the Unit Amount from source object. This is the Lineitem unit amount.

 

TaxType: This column or literal value represent the TaxType from the source object. Used as an override if the default Tax Code for the selected AccountCode is not correct

 

Invoice Specific Fields

 

Type: This column or literal value represents the type of Invoice from source object. The value should only be "ACCPAY" (Bill) or "ACCREC" (Invoice)

 

Purchase Order Specific Fields

DeliveryDate: This column represents the Delivery Date for Purchase Order in the source object. Date the goods are to be delivered. Literal value is not applicable for this field. The field should be map from a Date or DateTime type field.

 

Reference Fields

Xero Source Lookup Field: This field stores the reference record ID from Xero after a successful submission. This is only applicable for Invoice mapping

Target Reference Field

System Information

Protected Component