Liferay Commerce 2.1 Connector to PunchOut2Go
Subscription
Liferay provides a PunchOut2Go connector that integrates 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 you’ve already deployed Liferay Commerce to your Liferay server to avoid conflicts.
-
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 messages appear 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
You can configure the PunchOut2Go connector for each channel. During configuration, you must have the URL of the store’s catalog page.
-
Navigate to the Control Panel → Commerce → Channels.
-
Select a channel and go to Punch Out.
-
Switch the toggle to Enabled.
-
Enter the Punch Out Start URL.
-
Click Save when finished.
Enable Auto Login Punch Out Access Token
You must enable the punch out access token for the buyer’s procurement system to enable access to the Liferay Commerce instance.
-
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.
Punch Out Access Token Provider Configuration
After enabling the punch out access token, you can configure the punch out access token provider.
-
Navigate to the Control Panel → Configuration → System Settings.
-
Click OAuth2 under Security. The Punch Out Access Token Provider Configuration is open by default.
-
Access Token Duration: Sets the validity of the token
-
Access Token Size: Sets the size of the token
-
-
Click Save.
Create a Punch Out Buyer Role
It is best practice to have a role for vendors using punch out. To learn more about Commerce roles, see Commerce Roles. For more information about roles and permissions in Liferay DXP, see Understanding Roles and Permissions
-
Navigate to Control Panel → Users → Roles.
-
Go to Site Roles and click Add Site Role.
-
Enter the name as Punch Out Vendor.
-
Click Save.
-
Click Define Permissions.
-
Expand the Site Administration in the left menu.
-
Navigate to Applications → Open Carts.
-
Check the following permissions at the very least:
-
Check Out Open Orders
-
View Open Orders
-
-
Click Save.
This creates the new punch out role with the required bare minimum permissions. Assign this role to buyers that punch out.
Verify Redirect to Buyer’s Procurement System
After deploying and configuring the connector, users are redirected to the appropriate procurement system when they click Submit.