Setting up a Prima Solutions connection


Typically, connectors are defined with endpoints which determine exactly what data is being requested (pull customer records, post product details, etc.). However, the Prima Solutions connector works in a different way, with two generic endpoints:

  • comwsomhandler

  • wsomhandler

The actual data required for a request must be passed into the Prima Solutions connection shape, as part of your process flow. You do this via a manual payload shape.

Whatever is defined for the manual payload is passed into the body of the subsequent Prima Solutions connection request.

Finally - once a successful connection is made - the response must be converted from XML to JSON, ready for onward processing.

With this in mind, a process flow that needs to pull data from Prima Solutions will usually require three shapes in the following sequence:

  1. Manual payload shape, which includes the required request data in an XML string

  2. Connection shape, configured with a Prima Solutions endpoint

  3. Script shape, configured with an XML to JSON conversion script

For example:

Request data

Request data to be passed into a Prima Solutions connection shape must be based on the Prima Web Services XML Schema Definition. Some examples are shown below.

Converting response XML to JSON

Before the response from a Prima Solutions request can be be processed, it must be converted to a JSON payload. To do this, follow the steps below.

Step 1 Log into the Patchworks dashboard, then select process flows | scripts from the left-hand navigation menu.

Step 2 Scroll down to the marketplace panel and install the following script:

Prima Solutions - XML to JSON

Step 3 Configure your script shape to use this script.

Last updated