Liferay Commerce Connector to PunchOut2Go
Subscription Required
Liferay provides a PunchOut2Go connector that enables Commerce integration with a user’s existing PunchOut2Go infrastructure. You can download this connector from the Liferay Help Center as an LPKG file.
The PunchOut2Go connector requires Liferay Commerce 2.1.2 and Liferay DXP 7.1 FP18+ or 7.2 FP6+.
Deploy the PunchOut2Go Connector
Before deploying the PunchOut2Go connector, ensure Commerce is already deployed to your Liferay server to avoid conflicts. Then, follow these steps to deploy the PunchOut2Go LPKG connector:
-
Download the Commerce Connector to PunchOut2Go from the Liferay Help Center.
-
Copy the PunchOut2Go Connector
LPKG
into the${liferay.home}/deploy
folder. -
Verify that the following message displays in the application server console:
2020-07-24 22:10:01.924 INFO [fileinstall-/../../liferay-portal-7.1.10.1-sp1/osgi/marketplace][LPKGArtifactInstaller:209] The portal instance needs to be restarted to complete the installation of file:/../../liferay-portal-7.1.10.1-sp1/osgi/marketplace/Liferay%20Commerce%20Connector%20to%20PunchOut2Go%20-%20API.lpkg 2020-07-24 22:10:01.926 INFO [fileinstall-../../liferay-portal-7.1.10.1-sp1/osgi/marketplace][LPKGArtifactInstaller:209] The portal instance needs to be restarted to complete the installation of file:/../../liferay-portal-7.1.10.1-sp1/osgi/marketplace/Liferay%20Commerce%20Connector%20to%20PunchOut2Go%20-%20Impl.lpkg`
-
Restart the application server.
Once the server finishes restarting, the connector is active and ready for configuration.
Configure the Connector
The PunchOut2Go Connector is configured on a per-channel basis.
Users must have the URL of the store’s catalog page; in this example: http://localhost:8080/web/everest.com/catalog
.
- Navigate to the Control Panel → Commerce → Channels.
- Click on the desired channel.
- Click the Punch Out tab.
- Switch the toggle to Enabled.
- Enter the Punch Out Start URL.
- Click Save when finished.
Enable Auto Login Punch Out Access Token
Users must enable the Punch Out Access Token for the buyer’s procurement system to enable access to the Liferay Commerce instance. To enable the token:
-
Navigate to the Control Panel → Configuration → System Settings.
-
Click API Authentication under Security.
-
Click Auto Login Punch Out Access Token in the left menu.
-
Check the Enabled checkbox.
-
Click the Update button.
The Auto Login Punch Out Token is enabled and the buyer’s procurement system can now log in.
Punch Out Access Token Provider Configuration
Once the Punch Out Access Token has been enabled, users can configure the Punch Out Access Token Provider. In particular, they can set how long the token lasts and the size of the token. Follow the steps below:
-
Navigate to the Control Panel → Configuration → System Settings.
-
Click OAuth2 under Security.
-
Enter the following:
- Access Token Duration:
- Access Token Size:
-
Click Save when finished.
The Auto Login Punch Out Token is configured.
Create a Punch Out Buyer Role
As best practice, users should create a Role for vendors using Punch Out. To learn more about Commerce Roles, see Commerce Roles. For more information about Roles and Permissions in DXP, see Understanding Roles and Permissions
-
Navigate to the Control Panel → Users → Roles.
-
Click the Site Roles tab.
-
Click the Add Site Role button.
-
Enter the following:
- Name: Punch Out Vendor.
-
Click Save.
-
Click Define Permissions.
-
Expand the Site Administration in the left menu.
-
Navigate to Applications → Open Carts.
-
Check the following boxes (at the minimum):
- Check Out Open Orders
- View Open Orders
-
Click Save when finished.
The Role has been created with the required minimum permissions. Assign this Role to the buyers who are using Punch Out.
Verify Redirect to Buyer’s Procurement System
The checkout process with the Connector to PunchOut2Go active occurs in the same way. When users click Submit they are redirected to the appropriate procurement system.