2022

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel

Database to Sage Intacct Integration

  • Setup your Database for Integration. For In this Tutorial I am using MySQL Database Named "Sage IntacctDB".
  • Create tables "dbaccount" in Database with following script.

Database Script : MYSQL

Database Script : SQLSERVER

Database Script : Oracle

Code Block
create table 
`IntacctDB`
`Sage IntacctDB`.`dbAccount`

(`AccountID` varchar(100) NOT NULL ,
`AccountName` text NOT NULL ,
`BillingStreet` text ,
`BillingPostalCode` numeric(20) ,
`AnnualRevenue` decimal(30,2) ,
`CreatedDate` date ,
`LastModifiedDate` datetime ,
`NumberOfOfficeLocations` int ,
PRIMARY KEY (`AccountID`) );
Code Block
create table dbAccount

(AccountID varchar(100) NOT NULL ,
AccountName text NOT NULL ,
BillingStreet text ,
BillingPostalCode numeric(20) ,
AnnualRevenue decimal(30,2) ,
CreatedDate date ,
LastModifiedDate datetime ,
NumberOfOfficeLocations int ,
PRIMARY KEY (AccountID) );
Code Block
 
CREATE TABLE "SYS"."DBACCOUNT"

("ACCOUNTID" VARCHAR2(20 BYTE) NOT NULL ENABLE,
"ACCOUNTNAME" VARCHAR2(100 BYTE),
"BILLINGSTREET" VARCHAR2(50 BYTE),
"BILLINGPOSTALCODE" VARCHAR2(50 BYTE),
"ANNUALREVENUE" NUMBER(30,2),
"CREATEDDATE" DATE,
"LASTMODIFIEDDATE" VARCHAR2(40 BYTE),
"NUMBEROFOFFICELOCATIONS" NUMBER(*,0),
 CONSTRAINT "DBACCOUNT_PK" PRIMARY KEY ("ACCOUNTID")
 );
  • Enter a sample data in "dbAccount" table.
  • Go to www.mydbsync.com.Open  Open www.mydbsync.com in your browser and click on , click Customer Login.
  • Enter your DBSync username Username and password Password to login. Click on Launch to navigate to DBSync the Project console page.
  • Once into the DBSync console, click on Create profile Button, Enter Profile Name Click on Project on the left section of the console. Click on Create New Project. Enter Project name as Database-Sage Intacct and click on Save Button as shown.

Image Removed

Image Removed

  • A new Profile Project will be created by the given Name. In this tutorial, I have used name Database-Intaact. The Profile will be listed in the profile area as shown below:

Image Removed

  • Click on the Manage - Edit link on the right side of the profile Name. You will be redirected to the Process Builder window in the DBSync Console.

Image Removed

  • Click the Create Adapter Button on the left hand side.

Image Removed

  • Enter the Adapter Name, from AdapterType Drop Down Select Database Adapter and Click on Save Button.

Note: Adapter Name cannot contain Blank Space. 

Image Removed

  • Click on the Create Adapter button on the left hand side. Enter the Adapter Name, from AdapterType Drop Down Select Intaact Adapter and Click on Save Button.

Image Removed

  • Adapter will be created and will be listed in the Adapter section of the Process Builder.
  • Click on Edit link in front of the Database adapter and you will be presented with properties for the Adapter at the bottom left of the window. Enter values for all the properties and click on Save Properties. Both the sections of the window are shown below sequentially.

Image Removed

Image Removed

  • Click on Validate Link Next to Database Adapter. A message box is displayed; if the message says "Connection Settings are valid" you are good to go. Else Click on Edit and enter correct values for Adapter properties and repeat the steps. Click OK.

Note : If you are using a different Database server, you can enter the connection string for the same as shown here.

Image Removed

  • Click on Edit link in front of the Intaact adapter and you will be presented with properties for the Adapter at the bottom left of the window. Enter values for all the properties and click on Save Properties. Both the sections of the window are shown below sequentially.

Image Removed

Image Removed

  • Click on Validate link Next to Intaact Adapter. A message box is displayed; if the message says "Connection Settings are valid" you are good to go. Else Click on Edit and enter correct values for Adapter properties and repeat the steps. Click OK.

Image Removed

  • Click on Add Process Icon on the Right side of the screen. Enter Process Name and Click on Ok. A new process will be created and listed under profile name on the right side of the screen.

Image Removed

  • Double Click on the Process Name "DatabaseSync" to open the process in the Control flow for DatabaseSync process. The process will contain 2 States by default:
  1. Start_state
  2. End_state
  • Drag the Create State Button onto the control flow Area to create a new state. Enter the state name as "Execute" and click on OK Button. A new state will be created and placed on control flow area.

Image Removed

  • Wiki Markup
    Click on *\[X\]* icon on *Start_state* to delete the default control flow from *Start_State* to *End_state.*
  • Right Click\connect on Start_state followed by left click on Execute will create a control flow from Start_state to Execute. Right Click\connect on Execute followed by left click on End_state will create a control flow from Execute to End_state. All the control flows are displayed using arrows from one state to other state. Below you will find 2 screenshots one containing no control flow and second containing control flow as Start_state to Execute to End_state. Once done click on Save button at the top right corner of the window.

Image Removed

Image Removed

  • Double click on Execute state to open data flow for Execute state. Drag the Reader button onto the data flow area and enter the Name for reader and click on OK Button. In this tutorial I am using "DBReader" as the reader name.

Image Removed

  • Follow the same step for Create Map and Create Writer button. And you will get a data flow area as shown below in the screenshot. In this tutorial I have used "DBMap" for Create Map and "IntaactWriter" for Create Writer component.
    • Reader: Reader is a process component that reads data from source "data source". Reading the data is also known as "Extracting" the data. Note one state can have only one Reader.
    • Map: Map component converts data into the format that could be understood by writer and target data source. Converting the data so that it could be understood by target data source is also known as "Transforming" the data. Note One state can have more than one Map.
    • Writer: Writer component writes the data to target "data source". Writing the data into a data source is also known as "Loading" the data. Note One State can have more than one writer.

Image Removed

  • Right Click and click on Connect on DBReader followed by left click on DBMap to create a control flow from DBReader to DBMap.

Image Removed

Image Removed

  • Right Click and click on Connect on DBMap followed by left click on DBWriter to create control flow from DBMap to DBWriter. All control flows will be displayed using arrows. A screenshot is shown below displaying the control flow after following the above process.

Image Removed

  • Right Click and click on Properties on DBReader. The properties will be displayed in the bottom left area of DBSync Console. Select Database from Adapter Drop Down.

Image Removed

  • Once Database Adapter is selected, a query builder section will appear in properties area and a lookup icon on the right side of query builder section. Click on lookup icon and you will presented with a query section which will appear on the right of lookup icon. Query section will contain all the table listing from the database. Select the table and fields from the table to auto generate the query in query builder section. You can also write your own query. In this tutorial I am selecting all the fields from "dbaccount" table. Click on save button once done. The screen shot is shown below:

Image Removed

  • Right Click and click on Properties on IntaactWriter. The properties will be displayed in the bottom left area of DBSync Console. Select Intaact from Adapter Drop Down. Once Intaact Adapter is selected, all the properties for IntaactWriter will be listed in the properties area with lookup icon. Click on the lookup icon and list of objects from Intaact will be displayed in the query section on the right. Check on the target object (The object you want to write the data to) name on the right side of the window. In this tutorial my target object is "create_customer. Select insert in Writetype and click on Save button to save the properties. A screenshot is shown.

Image Removed

  • Right Click and click on Properties on DBMap. Enter 1 in the sequence text box. Enter description for the mapping. Click on Edit link for *******_map.xml file. You will be presented with a new window with source and target columns. Screenshots for Map properties and map editor is shown below respectively.

Image Removed

Image Removed

  • In the Map window click on Target column followed by source column to create field to field mapping. You can also use various functions provided by DBSync. In the mappings shown below I have used few of these functions. Rest of the functions and their details you can find in the wiki link "Mapping Functions". The Map window with all mappings done is shown below.

Image Removed

  • Once you are done close the mapping screen from close button on the top right. In the DBSync Console available in the previous tab of your browser click the RUN button to run the sync.

Image Removed

  • You can view the logs by clicking on Profiles on top right corner and then Log Viewer

Image Removed

  • The logs will be displayed as show below. Click on the required message to view the details. 

Image Removed

  • Sage Intacct.
  • Click on Create New Process. Enter process name as DatabasetoSage Intacct. Then, click Save, to save the process.
  • Click on Connectors on the left section of Project console. You need to create new connectors for Database and Sage Intacct.
  • Click on Create New Connector. Enter the Connector name as Sage Intacct and select the Connector type as Sage Intacct Adapter and click Save.
  • Enter all the required details. Click Save and then Validate connection.
  • Sage Intacct Connector is created and the connection is validated. Next, Database adapter need to be created.
  • Click on Connectors on the left section of Project console. Click on Create New Connector.
  • Enter connection name as Database and select the Connector type as Database Adapter. Click Save.
  • Enter all the required details. Click Save and then Validate connection.
  • Click on Projects. Then, click on the project Database-Sage Intacct. Here, you will see the new process DatabaseToSage Intacct. Click on the newly created process DatabaseToSage Intacct.
  • Using the button Create New Workflow, create the workflow "Execute".
  • Click on workflow Execute. You will see two sections: (1) Trigger on the top; and, Rules on the bottom.
  • In Trigger section, go to Advanced Query Builder and select Datasource as Database.
  • Click on Switch to Advanced view. Enter the following query in the Query Builder. Click Save and Close.
Code Block
 select AccountID, AccountName, BillingStreet, BillingPostalCode, AnnualRevenue, LastModifiedDate, NumberOfLocations from dbaccount.
  • In Rules section of a workflow, click on Add New Rule. Select Target Connector, Operation, Target Object as Sage Intacct, Insert and create_customer, respectively.
  • Click on the Map in this newly created Rule. You will see a mapping screen.
  • In the mapping screen, you will see a list of target fields in the left section. On the right, you will see the source fields under Schema.
  • Drag and drop required fields from Schema into the required source fields.
  • Once you are done, close the mapping screen. Click 'Save and Close' on the top right. Save the workflow and make sure that the status of workflow is On.
  • You can run the integration using the Run button; or, the Scheduler on the left section of Project console. Run button is available once you open the Project.
  • Using the button Logs on the left section, you can view the Logs.
  • This concludes brief introduction on how to build DBSync integration data flow from Database to Sage Intacct.