Synchronize Salesforce Contacts with Database Contacts

Synchronize Salesforce Contacts with Database Contacts

Configuring and publishing the JDBC connection

Configuring and publishing the JDBC connection

Before configuring the JDBC connection, perform the following steps:
  • Create a database to store contacts.
    The following snippet is an example for creating database in MySQL:
    CREATE DATABASE `ip1`; CREATE TABLE `sfdc_contact_sync` ( `First_Name` varchar(50) DEFAULT NULL, `Last_Name` varchar(45) NOT NULL, `Account_Name` varchar(100) DEFAULT NULL, `Contact_ID` varchar(45) NOT NULL, `Phone` varchar(20) DEFAULT NULL, `Home_Phone` varchar(20) DEFAULT NULL, `Mobile_Phone` varchar(20) DEFAULT NULL, `Other_Phone` varchar(20) DEFAULT NULL, `Fax` varchar(20) DEFAULT NULL, `Email` varchar(45) DEFAULT NULL, `Title` varchar(45) DEFAULT NULL, `Malling_Street` varchar(100) DEFAULT NULL, `Malling_City` varchar(45) DEFAULT NULL, `Malling_State` varchar(45) DEFAULT NULL, `Malling_Zip` varchar(20) DEFAULT NULL, `Malling_Country` varchar(20) DEFAULT NULL, `Decription` varchar(5000) DEFAULT NULL, PRIMARY KEY (`Contact_ID`), UNIQUE KEY `CONTACT_ID_UNIQUE` (`Contact_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  • To use a MySQL database, you can download the
    mysql-connector-j-8.0.33.jar
    driver or any other appropriate JDBC driver from https://dev.mysql.com/downloads/connector/j/.
  • To use a Microsoft SQL Server database, you can download the
    mssql-jdbc-6.4.0.jre8.jar
    driver or any other appropriate JDBC driver from https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc/6.4.0.jre8.
To configure and publish the JDBC connection, perform the following steps:
  1. Open the
    JDBCConnectionContact
    connection.
  2. In the
    Type
    field, select
    JDBC Generic Cloud Adapter
    .
  3. In the
    Run On
    field, select the Secure Agent.
  4. In the
    OData-Enabled
    field, select
    Yes
    .
  5. In the
    OData Cloud Access Enabled
    field, select
    Yes
    .
  6. In the
    Connection Properties
    section, enter values for the following properties:
    Property
    Description
    JDBC Connection URL
    The URL schema for the database. Use the corresponding schema for the following databases:
    • IBM DB2:
      jdbc:db2://<server>:<port>/<database>
    • Microsoft SQL Server:
      jdbc:sqlserver://<Host>:<Port>;databaseName=<Database>
    • MySQL:
      jdbc:mysql://<Host>:<Port>/<Database>
      If you encounter an issue, append
      ?useSSL=false&allowPublicKeyRetrieval=true
      to the JDBC Connection URL. For example,
      jdbc:mysql://<Host>:<Port>/?useSSL=false&allowPublicKeyRetrieval=true
    • Oracle:
      jdbc:oracle:thin:@//<Host>:<Port>/<Service>
    • PostgreSQL:
      jdbc:postgresql://<Host>:<Port>/<Database>
    JDBC Jar Directory
    The path to the JDBC driver .jar file. For example, you can enter the following directory:
    C:/jdbc
    If you do not specify a directory path, the Secure Agent gets the .jar file from the
    process-engine/ext
    directory.
    You must specify one of the following values for the JDBC connection to work successfully:
    • JDBC JAR directory. If you choose to specify the JDBC JAR directory, you can place the .jar file in any directory and specify the directory in the
      JDBC Jar Directory
      field.
    • JDBC driver class name. If you choose to specify the JDBC driver class name, you must place the JDBC driver .jar file in the following directory:
      process-engine/ext
    JDBC Driver Class Name
    The name of the JDBC driver class.
    Based on the database, you can specify one of the following driver class names:
    • IBM DB2:
      com.ibm.db2.jcc.DB2Driver
    • Microsoft SQL Server:
      com.microsoft.sqlserver.jdbc.SQLServerDriver
    • MySQL:
      com.mysql.jdbc.Driver
    • Oracle:
      oracle.jdbc.OracleDriver
    • PostgreSQL:
      org.postgresql.Driver
    You must specify one of the following values for the JDBC connection to work successfully:
    • JDBC JAR directory. If you choose to specify the JDBC JAR directory, you can place the .jar file in any directory and specify the directory in the
      JDBC Jar Directory
      field.
    • JDBC driver class name. If you choose to specify the JDBC driver class name, you must place the JDBC driver .jar file in the following directory:
      process-engine/ext
    Schema
    The schema name, which varies by database. Use the following guidelines for the schema name:
    • IBM DB2: Use the schema name to specify the correct object.
    • Microsoft SQL Server: Use the schema name to specify the correct object.
    • MySQL: Optional. The schema name is the database name.
    • Oracle: Optional. The schema name is the user name.
    • PostgreSQL: Use the schema name to specify the correct object.
    If the JDBC connection URL does not provide enough context, you must enter a schema name to fetch the metadata.
    User name
    User name to connect to the database.
    Password
    Password to connect to the database.
  7. Save and publish the connection.

0 COMMENTS

We’d like to hear from you!