How to install SFX

Go to SFX Product page in the Appexchange.


Click “Get It Now”
Follow options to “Login to AppExchange”


Choose to “Install in production” or “Install in sandbox”


Read and Check “I have read and agree to the terms and conditions”, click Confirm and Install


Login to your salesforce org, select the users and click on


Select the SSL encryption and grant access for eWAY Payment gateway and SFX connector.


SFX package will now install in the selected Org.


SFX Activation
SFX app can be selected from the top right drop down menu.


Update details under the setup tab followed by clicking on to complete SFX activation.


SFX is now activated

Salesforce Authorisation.
Click on to connect Salesforce with Xero


Click on Authenticate for authorizing the Salesforce connection with SFX connector, followed by clicking on “Allow Access”


Xero Authorisation
Clicking on the link will display options to enter Consumer key and Consumer Secret to complete the process of “Connect to XERO”. Refer Configuration guide and download Public key for this process.


Upon connection, successful message is displayed.


eWay Payment Gateway Setup
This feature is optional and configured if eWay is used as a Payment Gateway.
To setup eWay, click on and search for “Custom Settings” in the quick find box found on the left panel.


Click on Manage to enter API+PASS for eWay


Enter the API Key and password from eWay as shown
Name should be “Eway Credentials”
API+Pass should be entered as per the given format “API Key“:”Password” separated by colon “:”
For Example: C3AB9CoK/S5QImUXK8WdNrYF1VLiXvKS4lCypteh9NEIBo8L8IY6:Reset!123


Click on Manage to enter Ewaykeydata for Eway Key


Enter the Ewaykeydata – Please note to copy and paste as-is the Name and Ewaykeydata as given below:
Name should be “keyname”
Ewaykeydata should be


Add another record and update the fields Name and Ewaykeydata with following: (Please note to copy and paste as-is)

Name should be “keyname2”
Ewaykeydata should be


SFX Configuration
Adding button on the Opportunity page
Edit opportunity layout, drag the button on to the Custom buttons area on the page, save the layout.


Creating a New Invoice
New Invoice button is displayed on the Opportunity layout, this button will enable to create an Invoice


There are two options to add products to the Invoice; you could either add any product, which are not related to the opportunity line items or just Click on the button “Copy Opportunity line items”. This will copy all the products added to the related opportunity.
Note: Remember to select the correct Tax rate as defined in Xero


Invoice is generated and the same invoice is created instantly in Xero with the same invoice number.


Features on Invoice Detail page:
a. Generate PDF: A pdf format Invoice is generated for printing purpose, stored under notes and attachment’s
b. Send Invoice: Email the Invoice to the selected contact, upon generating PDF. History captured under activity history.
c. Approve Xero Invoice: Enable to approve the Invoice, this changes the status of the invoice to Approved both in Salesforce and Xero. Note: Once this is done, you will be unable to edit/modify the approved invoice in XERO
d. eWay PAY: This button will enable to take instant credit card payments
Alternately related list on the Invoice object will enable you to record any Bank related transactions.

Emailing Invoice
To Email invoice, first generate pdf and then use the button to send the invoice via email to the selected contacts.


Payment processing via eWay
Click on eWay Pay button. This will open a pop-up a window with Pending Invoice amount and option to enter *Card details followed by clicking on PAY button.


Payments are processed by eWay and transaction detail updated back to Salesforce Invoice under eWay Transactions.
On successful transaction payment detail is updated to Xero.
Card details are managed by eWay, no details are stored in Salesforce.

Other Payments
The other payments can be used to capture payments for instance bank payments, which is then recorded in Salesforce & Xero


Upon successful payment, Transaction details are updated under Payments and eWay Transactions related list.


Xero Tax / Branding
Click on the tab followed by clicking on the button
This will retrieve tax codes from your Xero Org


Update these<Xero Tax Codes>values highlighted in the image to<Opportunity Products>object custom field<Xero Tax Code>picklist.

For Branding click on<Get Xero Branding Theme Id>


Update the custom field of Opportunity object. The values should be the “Branding Theme Name” in this example the value is “Standard”

Auto Invoice Creation using Process Builder
Invoice auto creation and updating is based on the opportunity create, edit and condition mentioned in Process builder.
Conditions are based on use cases such as Opportunity Stage = “Closed won” or as required by the business.

Following configuration is for an example where Opportunity Stage = “Closed won” and is applicable in two different scenarios.
Scenario 1: New Invoice Creation
Invoice auto-creation is based on creating of new opportunity, condition being Opportunity Stage = “Closed won”
Scenario 2: Edit Opportunity line item (for an opportunity with existing Invoice)
In a scenario where the opportunity line items have to be modified, the Invoice is auto updated, only upon editing the opportunity

To setup a Process Builder, click on and search for “Process Builder” in the quick find box found on the left panel.


Click on button to create a <new> process.

Add a Process name as “Create Invoice on Opportunity – Stage”


Select the Object, in this case “Opportunity “


Add the Criteria as shown in the diagram below, in this case Opportunity Stage = “Closed Won”


Next add Action. For the action select “Apex”, provide a name and select the Apex class “SFX-AutoInvoice”


Followed by “Set Apex Variable”,
Select Field as OpportunityIds
Select Type as reference and
Select Value as Opportunity.ID
Save and Activate the Process builder.
Pre-requisite on Opportunity Create or Update:
Opportunity should be linked to Account
Opportunity should have line items with Xero Tax code values (Refer Index#13)
Opportunity contact role with primary contact
Opportunity should have “Xero Branding Theme” values updated
Editing of opportunity line items of an existing Invoice is based on editing the Opportunity
Any Invoice with Status as “Authorised” cannot be edited or modified via Process builder
Incase of an additional invoice existing on the opportunity object, the invoice with latest date/time stamp is updated via the Process builder upon editing and saving the Opportunity

to top button