Configure and use DC Local Server Mode

DC Local for Salesforce

Last published at: October 31st, 2024
Delete

This article explains how to configure DC Local Server Mode for Windows and Linux, how to use it in any command-line interface, and how to process DC Jobs using DC Local Server Mode.

Configure DC Local Server Mode

Configuration files location

You can find the configuration files here:

 plauti/dclocalserver

The server usually works with the system user.
You can find the files in the 'Root' directory. If you change the running user, follow the 'User' directory to find the files.

Windows - Root

    c:\Windows\System32\config\systemprofile\plauti\dclocal_server

Windows - User

c:\Users\username\plauti\dclocal_server

Linux - Root

 /root/plauti/dclocal_server

Linux - User

 /home/username/plauti/dclocal_server

Configure DC Local Server Mode

Before you can use DC Local Server Mode with a new Org, you need to change some settings in the properties file, located in:

config/application.properties

Set batch profile

The batch profile setting determines how many resources DC Local will take up on your machine. The higher you set this, the quicker the jobs get processed. When set to 'High', DC Local will take up the maximum amount of resources to run jobs. If you have multiple processes running on your server, pick a lower setting. 

Set the environment

To establish a connection, DC Local needs to know which environment type it will work with: Salesforce (SF) or Microsoft Dynamics 365 (MS). 

Then, indicate if the Org to connect with is Production or Sandbox. The default setting is Production. Make sure that the environment mentioned in the file matches your Salesforce environment.
You can also set the environment to Custom so you can only log into the server through a custom URL. In that case, also set a custom domain to use for logging in.

For connecting with Microsoft Dynamcis 365, enter the URL of your Dynamics 365 instance.

Set an email address

Optionally set one or more email addresses to receive information when something goes wrong. Separate them with commas.

See below for an example of the configuration file where the environment has been set to Sandbox, and two email addresses to receive information have been set. Lines with a '#' in front of them are commented out. Remove the '#' to activate a setting parameter.

# Plauti DC Local configuration file

logging.level.root=INFO
logging.level.com.plauti.dcl=DEBUG
dcl.sf.namespace=dupcheck

# Low | Medium | High
dcl.batch-profile=Medium

# Service Mode Types -> SF (Salesforce), MS (Microsoft)
dcl.service-mode.type=SF
dcl.service-mode.email-list=john.smith@plauti.com, jane.doe@plauti.com

# Salesforce Org Type; PRODUCTION, SANDBOX or CUSTOM
dcl.service-mode.environment=SANDBOX
#dcl.service-mode.custom-domain=https://testcompany.my.salesforce.com 

# Instance URL FOR MS Dynamics
#dcl.service-mode.url=https://enteryourmsdynamicsinstanceurlhere.crm4.dynamics.com

Use DC Local Server Mode

1. Connect your Salesforce Org to DC Local

  1. Log into your Salesforce Org on any device.
  2.  On the device where you installed DC Local Server Mode, open a command-line interface.
    To start DC Local in server mode, type in the following command:
    Windows:
    net start dclocal
    Linux:
    sudo service dclocalserver start
  3. Open the log file. You can find it in:
    logs/app.log/spring.log
  4. Look up the verification URL in the log file. Still on the device where you installed DC Local Server Mode, navigate to the URL. 
  5. The connection page will ask you for a verification code. Find the code in the log file. Enter it on the page and click 'Connect'.
  6. Salesforce asks you to allow access to Duplicate Check. Click 'Allow'.

You are now connected.

You can stop DC Local using the following commands:

Windows

net stop dclocal

Linux

 sudo service dclocalserver stop
Delete

Once you have authenticated yourself, you can restart the service without new authentication. If you want to log in as a new user, delete the file 'console-app-session.pla', restart the server, and follow the steps above again.

Delete

You have 10 minutes to establish a connection. The DC Local server times out if no connection has been established after 10 minutes. You will receive an email notification about this if you have set an email address. Restart the server and connect again.

You can check the status of the DC Local server by doing the following:

Windows

Go to Services.

Linux

sudo service dclocalserver status
Delete

IP Restrictions

  • If your Salesforce Org has restrictions in force for incoming calls, whitelist your server in Salesforce.
    Add the IP address of the server where you installed DC Local Server Mode to the Login IP Ranges of the Profile that you will use to log into Salesforce, and to the Network Access settings in Salesforce Setup.
  • Furthermore, make sure that the server where you installed DC Local Server Mode can reach the following sites:

2. Send a job to the DC Local server

  1. On the server, start DC Local in server mode (see above).
  2. In Salesforce, go to the DC Job page and click 'Add New Job'.
  3. Enter the job details and click 'DC Local'.
  4. Optionally, check the progress in the spring.log file.
  5. The job will be sent back to your Org after it completes. Find it there to process the results.