How to Connect
Prerequisites
Before setting up the CPHive integration in iPaaS.com, ensure the following steps are completed:
Installing .NET Core 6.0
To ensure the proper functioning of CPHive, .NET Core 6.0 must be installed on the IIS server. Follow the steps below:
Download the .NET Core Hosting Bundle:
Visit the official .NET Core download page: Download .NET Core 6.0.
Download the ASP.NET Core Runtime Hosting Bundle.
Install the .NET Core Hosting Bundle:
Run the downloaded installer.
Accept the license agreement and click Install.
Wait for the installation to complete and click Finish.
Verify Installation:
Open a command prompt or PowerShell window.
Type the following command and press Enter:
dotnet --info
Ensure that the installed version is
.NET Core 6.0.x
.
Find the Specific CounterPoint Database Name
Open CounterPoint.
Enter your User ID, Password, and WorkGroup ID. Click OK.
In the upper-right corner, select the search (spyglass icon).
Search for and select View Environment Settings.
Navigate to the Database tab.
Make note of the following details:
Close CounterPoint
The MiSP will need to find "Company Alias" inside "System Configuration Utility".
Open Windows Search.
Search for and select System Configuration Utility.
Navigate to the Companies section.
Make note of the Alias Name.
Note: MiSP will need "Microsoft SQL Server" user credentials(username and password) for the CPHive install.
Install CPHive:
Assign CPHive to its own 32-bit App Pool. Ensure staging and production instances do not share the same pool.
The account running the App Pool must have:
Full access to the CPHive website DDCache folder.
Full access to the Counterpoint TLD directory (e.g.,
C:\Program Files (x86)\Radiant Systems\CounterPoint\CPSQL.8567\Toplevel\
).
If the Counterpoint TLD is on another server, a local user of the IIS server will not have access since they are a local user and not domain user. You may need to grant machine account permissions or use a user account instead
Verify Roles and Features on the Server with Counterpoint:
Open Server Manager:
Find the search box in the taskbar.
Type in server in the search bar and select Server Manager (Desktop App).
In Server Manager:
Select Local Server or All Servers.
Scroll down to Roles and Features and click Tasks > Add Roles and Features.
Follow the Add Roles and Features Wizard:
Click Next on the "Before You Begin" screen.
Select Role-Based or Feature-Based Installation and click Next.
Choose the server with Counterpoint as the Server Selection and click Next.
Configure the following server roles:
Scroll down and expand the Web Server (IIS) area.
Expand the Web Server sub-area and configure:
Expand HTTP Features:
Check all options except WebDAV Publishing.
Expand Health and Diagnostics:
Expand Performance:
Check all options (e.g., Static Content Compression, Dynamic Content Compression).
Expand Application Development:
Check .NET 4.5 Extensibility or later, ASP.NET 4.5 or later, ISAPI Extensions, and ISAPI Filters if not already checked.
Expand Security:
Reference Table for Server Role Features:
Filter Server Name | Name | Type | Path |
RR-SANDBOX-OI | Web Server (IIS) | Role Service | Web Server (IIS) |
RR-SANDBOX-OI | IIS Client Certificate Mapping Authentication | Role Service | Web Server\SecurityWRL Authorization |
RR-SANDBOX-OI | URL Authorization | Role Service | Web Server Filtering |
RR-SANDBOX-OI | Request Filtering | Role Service | Web Server and Domain Restrictions |
RR-SANDBOX-OI | IP and Domain Restrictions | Role Service | WOW64 Support |
RR-SANDBOX-OI | Windows Process Activation Service | Feature | Windows Process Activation Service |
Configure Management Tools:
Expand the Management Tools section.
Expand IIS 6 Management Compatibility:
Finalize the configuration:
Steps to Verify DNS Entry:
Open the Windows search bar and type IIS.
Select IIS Manager (Desktop App) from the search results.
Under Connections, expand Sites.
Navigate to and select Application Pool.
Verify that the Web Site Entry exists and confirm the Application Pool is named CPHive.
Configuring Website and SSL Certificate:
Note: IT team will need to add a subdomain for a website URL. Make sure you have that info handy later.
Note: IT will need to use a separate SSL certificate for each individual subdomain or client can buy a wildcard certificate that is good for any subdomain.
IMPORTANT: IT will need to configure your firewall to only allow internet traffic to CPHive from the following IP addresses:
outbound.iPaaS.com / 52.184.255.108 (iPaaS.com production environment)
69.61.66.128/27 (iPaaS.com staging environment)
Any IP addresses in use by IT for troubleshooting
Right-click the DNS Entry and select Manage Website.
Choose Advanced Settings.
Confirm that the Website is pointing to the wwwroot folder.
If using HTTPS:
Right-click Default Website and select Edit Binding.
Select Edit to confirm the HTTPS entry.
If an HTTPS wildcard certificate is missing, proceed with the following:
Adding and Configuring an Application Pool (If Missing):
If no Application Pool exists for the site:
Right-click Application Pools in the IIS Manager.
Select Add Application Pool.
Type CPHive for the Application Pool Name.
Keep the other defaults and click OK.
Update the following settings:
Choose Custom Account and click Set.
Enter the Username and Password for the server user credentials and click OK.
Click OK two more times to save the configuration.
Update Configuration
Edit appsettings.json with the following configuration:
{ "Logging": { "LogLevel": { "Default": "Information", "Microsoft.AspNetCore": "Warning" } }, "AllowedHosts": "*", "Settings": { "CPUser": "MGR", "CPPassword": "Yz2iAFNEqNdTC3E2EuUKiA==", "CPWorkgroup": "1", "LogSeverity": "E", "CounterPointTLD": "C:\\Program Files (x86)\\Radiant Systems\\CounterPoint\\CPSQL.8567\\Toplevel\\", "CounterPointAlias": "TestGolf_8567", "ConnectionStrings": { "CounterPoint": "Password=NotSoSecret;Persist Security Info=True;User ID=sa;Initial Catalog=TestGolf_8567;Data Source=RR-QA-CP-02" } } }
Notes for Customization:
Replace the following placeholders with the correct values from your CounterPoint system:
LogSeverity: Set this value to
"E"
(always use "E").CounterPointTLD: Replace with the top-level directory path of your CounterPoint system.
CounterPointAlias: Replace with the alias name of your company from CounterPoint.
ConnectionStrings: Update the following:
Password
: The password for your CounterPoint SQL Server user.User ID
: The user ID for your CounterPoint SQL Server.Initial Catalog
: The name of your CounterPoint database.Data Source
: The server name hosting your CounterPoint database.
Set IIS Folder Permissions
If using
ApplicationPoolIdentity
, grantIUSR
andIIS_IUSRS
full control over theDDCache
folder.
Cache Regeneration and Error Handling
After adjusting permissions, restart the app pool and perform the following steps in the local Swagger page:
Execute
GET /HelloWorld
.Execute
GET /token/{USR_ID}
.Check the
DDCache
folder to ensure the serialized definition file is generated.If errors persist, verify the following:
Ensure
USR_API_LOG
does not indicate permission issues.Resolve errors like:
DDCache serialization failed Could not find a part of the path 'C:\inetpub\wwwroot\CPHive8566\DDCache\SerializedDataDefinitions.json'.
Ensure serialized data definitions are saved to the correct path.
If custom fields are added to the Counterpoint database:
Regenerate the cache file to include mappings for these fields.
Failing to do so may result in errors like:
"The given key 'USR_RR_REQUEST_VIEWS' was not present in the dictionary."
Bad Request(Http Code: BadRequest)
.
Installation and Setup
How to Extract the CPHive Folder
Locate and download the
CPHive.zip
file to a designated folder (e.g., Downloads). Right-click theCPHive.zip
file.Select "Extract All" from the context menu.
When prompted, browse and select the website entry's
wwwroot
folder as the destination (e.g.,C:/inetpub/wwwroot
).Click "Extract" to start the extraction process.
If a permissions dialog box appears:
Converting the CPHive Folder into an IIS Application
Once the CPHive folder is extracted, you need to convert it into an IIS application.
Open File Explorer and navigate to the C: drive.
Locate and open the
inetpub
folder.Open the
wwwroot
folder.Locate the
CPHive
folder.Drag and drop the
CPHive
folder into thewwwroot
directory.After completing this step, the folder structure should match the example below.
Next, the MiSPwould need to convert the CPHive folder into an application.
Open the Windows Search Bar and type IIS.
Select "Internet Information Services (IIS) Manager" from the search results.
In the Connections pane of the IIS Manager:
Set the Application Pool to the existing "CPHive" instance. If no such pool exists, create a new 32-bit Application Pool with the name "CPHive."
Verify that the Physical Path points to the
C:/inetpub/wwwroot/CPHive
folder.Click "OK" to complete the conversion.
Once the application is successfully converted, the CPHive folder icon in IIS Manager will change to an application icon.
How to Set Up the CPHive appsettings.json File
Navigate to the CPHive Directory
Open File Explorer and go to
C:/inetpub/wwwroot/CPHive
.Locate the
appsettings.json
file.
Edit the
appsettings.json
FileOpen the
appsettings.json
file with a text editor (e.g., Notepad or Visual Studio Code).Replace the placeholder values with those from your CounterPoint system. Below is an example configuration format:
{ "Logging": { "LogLevel": { "Default": "Information", "Microsoft.AspNetCore": "Warning" } }, "AllowedHosts": "*", "Settings": { "CPUser": "Your_CP_User", "CPPassword": "Your_CP_Encrypted_Password", "CPWorkgroup": "Your_Workgroup_Number", "LogSeverity": "E", "CounterPointTLD": "C:\\Program Files (x86)\\Radiant Systems\\CounterPoint\\CPSQL.8567\\Toplevel\\", "CounterPointAlias": "Your_Company_Alias", "ConnectionStrings": { "CounterPoint": "Password=YourPassword;Persist Security Info=True;User ID=YourUserID;Initial Catalog=YourDatabaseName;Data Source=YourServerName" } } }
Save the Changes
Save the file and verify all values (e.g.,
CPUser
,CounterPointTLD
, etc.) match your CounterPoint setup.
(Insert Screenshot Placeholder: Edit appsettings.json
File Here)
Set File and Folder Permissions
Ensure that the
DDCache
folder has the following permissions if the app pool is set to run asApplicationPoolIdentity
:Users:
IUSR
andIIS_IUSRS
must have Full Control.
Regenerate the Cache
Open a browser and navigate to the local Swagger page for the CPHive API. Perform these requests in order:
GET /HelloWorld
GET /token/{USR_ID}
After each request, verify the
DDCache
folder contains a new serialized data file (SerializedDataDefinitions.json
).If the file is missing, ensure the app pool user has the necessary folder permissions, restart the app pool, and repeat the steps.
Troubleshoot Issues
Serialization Errors: If you encounter a
Could not find a part of the path
error, ensure theDDCache
folder exists and is accessible.Mapping Errors: If custom fields are added to CounterPoint, regenerate the cache to include these fields. Failure to do so may result in errors like
"USR_RR_REQUEST_VIEWS not present in the dictionary"
.
How to Set Up the CPHive web.config File
Note: This section is deprecated and only applies to legacy versions.
Navigate to
C:/inetpub/wwwroot/CPHive
in File Explorer.Locate the
web.config
file, right-click it, and select "Move to".Choose the
Downloads
folder as the destination and confirm the move.
Open the
web.config
file in theDownloads
folder using a text editor (e.g., Notepad).Update the following fields:
CounterPointTLD
: Replace with the CP system's top-level directory path (e.g.,C:\Program Files (x86)\Radiant Systems\CounterPoint\CPSQL.8567\Toplevel
).ALIAS
: Replace with the company alias from the CP system.CPUSER
: Enter the username of a valid CP user.CPPassword
: Enter the password for the corresponding CP user.CPWorkgroup
: Enter the valid workgroup number of the CP user.
Scroll to the
<connectionStrings>
section and update the<add name>
portion:Save the file after making the updates.
Right-click the updated
web.config
file in theDownloads
folder and select "Move to".Choose "Select a location" from dropdown.
Navigate to and select CPHive folder.
Click "Move" and click "Continue".
Confirm the
web.config
file is now located inC:/inetpub/wwwroot/CPHive
.Open the file and ensure all updated values (e.g.,
CounterPointTLD
,ALIAS
,CPUSER
, etc.) are correctly reflected.
How to Run the Database Installer for CPHive
Note: This section is deprecated and only applies to legacy versions.
If installation errors prevent progress, refer to the CPHive Database Manual Install article for assistance before proceeding.
Successfully running the Database Installer ensures the required SQL Server tables are created for CPHive to function properly.
Open Microsoft SQL Server Management Studio.
In the "Connect to Server" window:
In the Object Explorer:
Leave SQL Server Management Studio open and proceed with the Database Installer in File Explorer.
Executing the Database Installer
Open File Explorer and navigate to C:/inetpub/wwwroot/CPHive.
Open the Database Installer folder.
Right-click on the Deliverator application and select Run as Administrator.
In the Deliverator interface:
Click the … button next to "Company Alias Folder":
Click Verify for both:
CounterPoint Connector String
Company Alias Folder
Click Install to execute the database scripts.
If a version warning appears, click OK.
Note any errors during installation for troubleshooting.
How to Flush the CPHive Site
To implement new settings and ensure they take effect, you must flush the CPHive site. Follow these steps:
Open the Windows search bar and type IIS.
Select Internet Information Services (IIS) Manager from the search results.
In the IIS Manager:
In the Actions pane on the right:
The website has now been successfully flushed, and the new settings are active.
How to Test the CPHive Installation
To verify that the CPHive installation was successful, follow these steps:
Open a web browser on the server.
Note: Do not use Internet Explorer for this test. If no alternative browser (e.g., Chrome, Firefox) is installed, consult with the client’s IT team to install one.In the address bar, type:
localhost/CPHive/api/HelloWorld
Press Enter to execute the test.
If the installation was successful, an XML file should appear in the browser, confirming that the CPHive API is functioning correctly.
If the XML file does not appear or an error message is displayed, review the installation steps or consult troubleshooting documentation.
Configure Subscription Settings
Navigate to the CPHive subscription settings in iPaaS.com and provide the following information:
Field | Description | Required | Example |
Name* | A unique name for identifying the subscription. | Yes | CPHive_Integration |
Versions | The integration version. | Yes | v1.2 |
CP API URL* | The base URL for the CPHive API. | Yes | |
CP API Username* | The username for accessing the CPHive API. | Yes | api_user |
CP API Key* | The API key generated for accessing CPHive. | Yes | YourAPIKey |
First Order Date | Starting date for order sync. | No | 2024-01-01 |
Store | The store identifier. | No | Store_01 |
Drawer | The drawer identifier. | No | Drawer_1 |
Station | The point-of-sale station identifier. | No | Station_001 |
User | User details associated with this subscription. | No | SystemAdmin |
Template Customer | Template customer for transactions. | No | TemplateCustomer123 |
Default Customer | Default customer ID. | No | DefaultCustomer456 |
Next Customer | Next customer ID to use for operations. | No | NextCustomer789 |
Tracking #s in CP | Indicates whether to track numbers in CP. | No | Enabled |
Item Description From | Defines the source for item descriptions. | No | Inventory |
Inventory Qty Method | Method for inventory quantity sync. | No | Weighted |
Inventory Location | Default location for inventory. | No | MainWarehouse |
Qty Stock Threshold | Threshold for stock quantity alerts. | No | 100 |
Authentication Methods
API Key Authentication
Navigate to the CPHive subscription settings in iPaaS.com.
Enter the CP API URL, CP API Username, and CP API Key as obtained during setup.
Save the configuration and test the connection.
Upon successful authentication, a confirmation message will be displayed.
Installing CP Webhooks
How to Create a Company Folder in the Downloads Folder
To prepare for the CPWebhook.exe file configuration, follow these steps to create a company folder in the Downloads folder:
Open File Explorer by clicking on its icon in the taskbar or searching for it in the Windows search bar.
Navigate to the C: drive by selecting it from the left-hand navigation pane.
Locate and open the Downloads folder.
Inside the Downloads folder, right-click on an empty area to open the context menu.
Hover over the New option and select Folder from the submenu.
Rename the newly created folder to match the client’s company name (e.g., "Acme_Corp").
The company folder is now ready for CPWebhook.exe file configuration.
How to Extract the "CPWebhooks" Folder
To extract the CPWebhooks folder:
Locate and drag the
CPWebhooks.zip
file into the Downloads folder.Right-click the
.zip
file and select Extract All.In the dialog box, browse to the company folder inside the Program Files directory (e.g.,
C:/Downloads/RedRook
).Click Extract to begin the extraction process.
If prompted for permissions, click Continue to confirm and complete the extraction.
How to Locate the API Key for "CPWebhooks"
Locate the CounterPoint subscription and click Edit.
Copy the Webhook API Key from the subscription settings.
Save the API Key for Later Use:
Paste the copied API key into a secure location, such as a text editor or password manager.
This API key will be required for the configuration of CPWebhooks.exe
.
How to Set Up the CPWebhooks.exe File
This section explains how to set up the CPWebhooks.exe
file, configure it, and ensure it runs properly.
Move the CPWebhooks.exe
File to the Downloads Folder:
Open File Explorer and navigate to
C:\Program Files
.Locate and open the
CPWebhooks
folder.Right-click on
CPWebhooks.exe
and select Move to.Choose the Downloads folder as the destination and confirm the move.
Update the CPWebhooks.exe
Configuration File:
Navigate to the Downloads folder.
Right-click the
CPWebhooks.exe
file and select Open with a text editor (e.g., Notepad).Update the following fields:
Token: Replace this with the Webhook API Key obtained earlier.
In the
<connectionStrings>
section:User ID: Replace with a valid CP Microsoft SQL Server user ID.
Password: Replace with the password for the SQL Server user.
Initial Catalog: Replace with the database name of the CP system.
Data Source: Replace with the server name of the CP system.
Move the CPWebhooks.exe
File Back to the CPWebhooks
Folder:
Navigate to the Downloads folder.
Right-click on
CPWebhooks.exe
and select Move to.Select choose location from dropdown.
Select the
CPWebhooks
folder insideC:\Program Files
as the destination.select Move to and then Continue
Run the InstallCPWebhooks.bat
File:
Open the Windows Search bar, type Command Prompt, and right-click to select Run as Administrator.
In File Explorer, navigate to the
CPWebhooks
folder and copy the folder address.Return to Command Prompt, type
cd
, and paste the folder address.Press Enter to change the directory.
Type
InstallCPWebhooks.bat
and press Enter to run the script.
Verify and Start the
CPWebhooks
Service:Open Windows Search and type Services.
Locate the service named CPWebhooks for iPaaS.com.
Right-click the service and select Start.
If the service is missing, check the
CPWebhooks.config
file for errors, correct them, and rerun theInstallCPWebhooks.bat
file.
Note: If issues persist during the process, ensure the configuration file contains accurate information and matches the client's system requirements.
Initialization Support
The following types of data support initialization and can be transferred in bulk:
Alternate ID Type TO iPaaS.com
Customer Category TO iPaaS.com
Location TO iPaaS.com
Location Group TO iPaaS.com
Payment Method TO iPaaS.com
Product Category TO iPaaS.com
Shipping Method TO iPaaS.com
Throttling
Throttling ensures that CPHive’s API isn’t overwhelmed by excessive API calls, preserving system performance during heavy data transfers.
While the throttling fields are required, the values are pre-populated by the integration settings. For more details, refer to Subscription Configuration – Edit.
Troubleshooting
Missing .NET Requirement:
If .NET pre-requisites are not installed, the local website test will not load.
HTTP 500.30 Errors:
If the website loads but returns an HTTP 500.30 error, check Windows event logs for specific details.
Invalid appsettings.json
:
Ensure all previously used values are JSON-escaped if any issues appear in the Windows event logs.
Debug Logging in Production:
If enabling debug logging, poor database performance may cause errors like:
"Unable to process transfer. Reason: CPHive returned the following error: The operation was canceled.(Http Code: 0)"
Recycle App Pool:
After changing any settings, recycle the app pool.