Liferay Connector to Salesforce

Subscription

Liferay DXP 7.4 U35+

The Liferay Connector to Salesforce uses Talend job designs and Liferay’s Job Scheduler to import data from Salesforce to Liferay DXP. You can download the connector and deploy it to your Liferay instance as an .lpkg file. This file contains Talend jobs that map Salesforce data fields to Liferay data fields.

Once deployed, Liferay automatically creates job scheduler tasks for each Talend job. You can then configure and run each task manually or schedule them to run at specific intervals via Job Scheduler.

Supported Entities

The following chart shows supported Salesforce entities with their Liferay counterparts. Currently, you can only import Salesforce data to Liferay.

SalesforceLiferay
AccountAccount
Account AddressAccount
Account ContactUser
Price BookPrice List
Price Book EntryPrice Entry
ProductProduct
OrderOrder
OrderItemOrder Item
note

There is no equivalent entity for Liferay’s product catalogs in Salesforce. Importing Salesforce products to Liferay requires a catalog with its externalReferenceCode set to SALESFORCE. If one does not exist, Liferay creates the catalog automatically and uses it to store imported products.

Deploying the Connector to Liferay DXP

  1. Download the connector from the Liferay Marketplace.

  2. Copy the .lpkg file to the DXP instance’s ${liferay.home}/deploy folder.

  3. Verify these messages appear in the application server console:

    Processing Liferay Connector to Salesforce 1.0.0.lpkg
    The portal instance needs to be restarted to complete the installation of file:/Users/able/bundles/osgi/marketplace/Liferay%20Connector%20to%20Salesforce%20-%20Impl.lpkg
    
  4. Restart your Liferay DXP instance.

  5. After restarting, confirm the deployment was successful by opening the Global Menu (Global Menu) and navigating to Control PanelJob Scheduler.

    If successful, you should see four new job scheduler tasks.

    Verify the addition of four new job scheduler tasks.

    Before running these tasks, you must configure their context parameters.

Configuring the Job Scheduler Tasks

Upon creation, the settings editor for each Talend job scheduler task is populated with default context parameters automatically. You can use these parameters to provide necessary credentials and to modify each task’s behavior at run time.

warning

Be careful when removing parameters from the settings editor. If a key’s value is blank, it disappears when saving the settings. If you lose the key-value pairs, they can’t be restored, and you’ll have to recreate the task.

Credentials Reference

Each task includes these fields for entering Liferay and Salesforce credentials.

Context ParameterDescription
LiferayServerURLURL for the Liferay server
LiferayUserLiferay account username
LiferayPasswordLiferay account password
SalesForceURLSalesforce SOAP API Url
SalesForceUserSalesforce account username
SalesForcePasswordSalesforce account password
SalesForceTokenSalesforce OAuth API token
note

You can filter data from Salesforce so that only the newly modified or created records are imported. To do this, you must set the deltamins parameter in your job configuration. This parameter specifies the minutes between checks for new or modified records.

For instance, if deltamins = 20 and lastRunDate = 01/12/2022 12:00:00, only records created or modified after 01/12/2022 11:40:00 are retrieved from Salesforce. If records already exist, Liferay’s import strategy updates them if needed and only inserts new records.

Products Reference

Context ParameterDescriptionDefault Value
catalogNameName of the catalog for storing Salesforce dataSalesforce
catalogExternalReferenceCodeExternal reference code for creating or fetching the catalog; must be SALESFORCESALESFORCE
catalogDefaultCurrencyDefault currency for the catalogUSD
catalogDefaultLanguageDefault language for the catalogen_US
catalogIdID of the catalog for storing Salesforce dataDetermined during execution
allowBackOrderBoolean value defining whether a product supports back orders when stock runs outtrue
displayAvailabilityBoolean value defining whether a product displays its availability on the product details pagefalse
productTypeProduct type used when creating all productssimple
freeShippingBoolean value defining whether a product supports free shippingfalse
shippableBoolean value defining whether a product can be shippedtrue
shippingSeparatelyBoolean value defining whether a product supports separate shippingtrue

Price List Reference

Context ParameterDescriptionDefault Value
catalogIdID of the catalog to associate with the price list0
currencyCodeDefault currency code for the price listUSD
neverExpireBoolean defining whether the price list expirestrue
priorityDetermines the priority of the price list when there are multiple applicable price lists0
hasTierPriceBoolean defining whether the price list contains tiered pricesfalse
standardPriceBoolean defining whether the price list contains standard pricesfalse

Accounts Reference

Context ParameterDescriptionDefault Value
accountTypeThe account type used when creating all accounts: 1 (personal) or 2 (business)2
countryMapping_nullThe country mapping for account addresses. It must use this syntax countryMapping_NAME=COUNTRY_ISO_CODE (e.g., countryMapping_Croatia=HR)
regionMapping_nullThe region mapping for account addresses. It must use this syntax regionMapping_NAME=REGION_ISO_CODE (e.g., regionMapping_Milan=MI)

Orders Reference

Context ParameterDescriptionDefault Value
channelIdID channel where orders are importedCopy the channel ID from the UI. Open the Global Menu (Global Menu) and go to CommerceChannels. Select a channel and copy the ID present next to the name.
defaultCurrencyDefault currency for ordersUSD
statusMapping_nullThe status mapping for order statuses. It must use this syntax: statusMapping_SalesforceStatusName=LiferayStatusCode (e.g., statusMapping_Activated=5)5
paymentStatusMapping_nullThe status mapping for order payment statuses. It must use this syntax: paymentStatusMapping_SalesforceStatusName=LiferayStatusCode (e.g., paymentStatusMapping_Payed=2)2
warning

Some default values are only placeholders. Running a job with these values may lead to failure. Please review all values to ensure successful imports.

Running the Job Scheduler Tasks

Once configured, you can run each task manually by clicking Run Now, or schedule them to run automatically. See Using Job Scheduler for more information.

important

Running these tasks can be resource intensive and degrade platform performance. To reduce performance impact, avoid running them during peak use hours.

Capabilities

Product

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy