Overview
This document describes the steps required for initial setup of the Rootstock to Intacct Financials Interface. This process is only required for initial startup of the interface and is only required once per Salesforce Org. Once the interface setup is completed, the export of data sets from Rootstock to Intacct is performed by the setup of scheduled batch jobs, which can be scheduled to run as frequently as desired, which is documented in this document. Note: Steps 1-9 are normally performed by Rootstock as part of the initial setup, and are included here for reference only.
Required Rootstock Setup Steps
1. From the Salesforce Setup menu navigate to Build/Create/Objects then either scroll down, or search for the SYDEFAULT object, and click on the 'Name' link
2. Hover over the Page Layouts link, then click on the 'Edit' link to open the latest Page Layout version, in edit mode
3. Click and hold on the 'Section' button, and drag it down near the bottom of the page layout, just above the System Information section, then release it
4. Enter 'Intacct Integration' as the Section Name, 2-Column Layout, and Top-Down Tab-key Order, then click OK
5. Click and hold each of the 'Intacct' fields and drag them down to the new 'Intacct Integration' section just created, in this order
Intacct User ID Intacct User Password
Intacct Company Intacct Timeout
Intacct Dimension for Class Intacct Dimension for Item
Intacct Dimension for Customer Intacct Dimension for Location
Intacct Dimension for Department Intacct Dimension for Project
Intacct Dimension for Employee Intacct Dimension for Vendor
Export Intacct Sales Invoices as SO Intacct - Pass Item Number as Item in PO
Intacct Warehouse Feature Active Intacct Freight/PP UOM
Intacct - Pass Company as Entity Intacct Sales Order Transaction Type
Intacct SO Inv Freight/Tax as Subtotals Intacct Purchase Order Transaction Type
Intacct PO Freight Subtotal Description GL Transaction Symbol
Intacct PO Tax Subtotal Description
6. Click on the dropdown next to 'Save' at the top of the page, and click Save As and save the page layout as the next higher version. For example, if the original layout was Layout V3, you would save as Layout V4
7. Hover over the Page Layout link again, and click on the Page Layout Assignment button
8. Click the Edit Assignment button, select the appropriate profiles, and select the new Page Layout, then click 'Save'
9. Click back to the Setup menu and navigate to Administer/Security Controls/Remote Site Settings, then click the New Remote Site button, Enter the values below, then click 'Save'
Remote Site Name - Intacct API
Remote Site URL - https://api.intacct.com
Disable Protocol Security - Unchecked
Description - The URL to access the Intacct Financial System API
Active - Checked
10. Open the System Defaults process page located in the System Setup menu section in Rootstock. In edit mode, scroll down to the Intacct Integration section near the bottom of the page
11. Enter the proper values for the fields noted here If you do not already know the values, they must be acquired from Intacct
Intacct User ID
Intacct User Password
Intacct Company
Intacct Timeout (recommended value is 120, which is in second)
NOTE When using a Multi-Entity Intacct environment, the option 'Intacct - Pass Company as Entity' may be checked so that the Rootstock Company Master > 'Company Number' field is also used as part of the logging details to connect to Intacct, in order to determine to which Intacct Entity should the export be routed to. The Rootstock Company Number must match exactly the Intacct Entity Company Name to which the export is to be processed. If not checked, the integration is done with the Top Level Intacct entity/company (exported records will be added to this Top Level Intacct Entity).
12. If Dimensions are to be used, enter the desired Rootstock Dimension value to represent each Dimension. These should correspond to the Dimension 1-8 values on the Rootstock Company record.
13. Determine which method of the Rootstock to Intacct Sales Invoice export is to be used.
If Rootstock Sales Invoices are to be exported directly as Accounts Receivable Invoices then do NOT check the ‘Export Intacct Sales Invoices as SO’ checkbox. If they are to be exported as Intacct Sales Orders, then check the checkbox – the default value is ‘Unchecked’, meaning the default export process is to export Rootstock Sales Invoices as Accounts Receivable Invoices. NOTE: The option to export as Sales Orders relies on the existence of at least one Warehouse object in Intacct,, which is used for the exporting of the Sales Invoices. All Rootstock Products and Customers on Invoices to be exported must already exist in Intacct, with a UOM value matching the UOM value of the Rootstock Product, otherwise, errors will be reported when the export is attempted..Click the 'Save' button to save your updates.
14. If you are not already subscribed to Intacct Web Services, you will need to subscribe. For information on using Intacct Web Services, see Intacct's Developer Community site at: developer.intacct.com. It may also be necessary to Authorize the Web Service. This needs to be done in the Intacct Environment:
- Navigate to Company > Company Info > Drill Down to 'Service Authorizations'
- See if there is an entry for 'Rootstock' as Sender Id (else create it)
- Edit and change status to 'Active' if not already set.
15. To setup the scheduled jobs that send Rootstock data to Intacct click on the User Menu, then click on Developer Console
NOTE This must be done by a System Admin user.
- Click on the Debug menu selection at the top of the Developer Console window, then select Open Execute Anonymous Window
- Copy and paste the text below into the Apex Code window
In this example, the values entered within the curly brackets represent the number of minutes past the hour when the apex jobs will run to export the Rootstock data to Intacct (every 5 minutes in this example). You can set these numbers as desired.
EXAMPLE For example, if you only want the apex jobs to run every 30 minutes, you would simply enter 0, 30 rather than the 12 integers in the example. Do not change any other text, other than the ‘minutes’ values, unless you understand the apex code, and what your changes will do. One other caveat, there is a limit of 100 total scheduled apex jobs per Salesforce org, which these export processes will be, so running any more frequently than every two minutes will not be allowed (doing so would create 120 scheduled jobs)
// Script to schedule all Intacct jobs
List<Integer> timeIntervals = new List<Integer>{ 00, 05, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55 }; for (Integer timeMins : timeIntervals){
String cronExp = '0 ' + timeMins + ' * * * ?';
String jeName ='Intacct Journal Export ' + timeMins;
String jejobid = System.schedule(jeName, cronExp, new rstk.IntacctJournalExporterScheduler());
String billJobName ='Intacct Payable Invoice Export ' + timeMins;
String pjobid = System.schedule(billJobName, cronExp, new rstk.IntacctPayableInvoiceExporterScheduler());
String invJobName ='Intacct Sales Invoice Export ' + timeMins;
String sjobid = System.schedule(invJobName, cronExp, new rstk.IntacctSalesInvoiceExporterScheduler());
}
16. To kill the scheduled jobs, perhaps to set up a different schedule, execute the apex text below, in the same Execute Anonymous window as above. Do not change text unless you understand the apex code.
// Script to remove all Intacct jobs
CronTrigger[] trigs = [select id, CronExpression, CronJobDetailId, CronJobDetail.name,
CronJobDetail.jobtype, EndTime, NextFireTime, OwnerId, PreviousFireTime, StartTime,
State, TimesTriggered, TimeZoneSidKey
from CronTrigger
where CronJobDetail.jobtype = '7' and CronJobDetail.name like 'Intacct%']; for(CronTrigger trig : trigs){
rstk.Logger.info('trigger: ' + JSON.serialize(trigs));
System.abortJob(trig.id);
}
17. Additional integration setup details, required in order for Journals, Payables Invoices, and Sales Invoices to be successfully exported from Rootstock into Intacct
- The Rootstock Customer(s) and Rootstock Vendor(s) must exist in Intacct.
- When Rootstock Vendors are sync’d, using the Sync Vendors button on the Rootstock Company Master, the Financial ID of the Intacct Account is written back to the associated Vendor record in Rootstock (noted as the Financial System Vendor ID on the Rootstock Vendor Master).
- The 'Sync' process does NOT add Vendors to Intacct
- There is currently no ‘Sync’ process for Rootstock Customers
- For Sales Invoices or Sales Orders (whichever option is active) to be successfully exported, the Rootstock Product must exist in Intacct (the check is between the ‘Product’ field on the Rootstock Product Master and the Item ID field on the Intacct Item.
- Additionally, the Rootstock Unit of Measure (UOM) must exist in a Unit Group under the Units of Measure in Intacct.
NOTE The export of Journals, Payables Invoices, and Sales Invoices are all that the interface currently supports18. Troubleshooting
- If the export jobs are scheduled, but one (or more) does not actually run on the schedule, check that the ‘In Process’ flag(s) on the System Default record is not checked, indicating the job is currently running.
- The flags are on the ‘Integration’ section of the page, and are titled ‘Sales Invoice Export in Use’, ‘Payables Invoice Export in Use’, and ‘Journal Batch Export in Use’.
- If for any reason one of the scheduled jobs does not complete normally, the shutdown process does not clear the indicator that the job is currently running. When the next ‘scheduled’ job attempts to run, it sees the flag as the job is currently running, and shuts down, waiting for the next schedule.
SEE ALSO