Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12,678 changes: 12,678 additions & 0 deletions en/docs/connectors/catalog/erp-business/pricefx/action-reference.md

Large diffs are not rendered by default.

115 changes: 115 additions & 0 deletions en/docs/connectors/catalog/erp-business/pricefx/example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
---
title: Example
---

# Example

## What you'll build

This example builds an automation that connects to Pricefx and lists the price list types defined in your partition. The automation calls the **List Price List Types** operation and logs the result.

**Operations used:**
- **List Price List Types** : Retrieves the price list types configured for your partition.

## Architecture

```mermaid
flowchart LR
A((User)) --> B[List Price List Types]
B --> C[Pricefx Connector]
C --> D[(Pricefx)]
```

## Prerequisites

- A Pricefx username, password, and partition. See the connector's [Setup Guide](setup-guide.md).

## Setting up the Pricefx integration

> **New to WSO2 Integrator?** Follow the [Create a New Integration](../../../../develop/create-integrations/create-a-new-integration.md) guide to set up your integration first, then return here to add the connector.

## Adding the Pricefx connector

### Step 1: Open the connector palette

Select **Add Connection** in the **Connections** section.

![Pricefx connector palette open before selection](/img/connectors/catalog/erp-business/pricefx/example/ballerinax_pricefx_screenshot_01_palette.png)

### Step 2: Select the Pricefx connector

Enter "pricefx" in the search box to filter the connector list, then select the **Pricefx** connector card (`ballerinax/pricefx`) to open its connection configuration form.

## Configuring the Pricefx connection

### Step 3: Bind the connection parameters to configurable variables

Bind the required connection fields to configurable variables.

- **Config** : The authentication method to use. Select **BasicCredentials** and bind its `username`, `password`, and `partition` fields.

![Pricefx connection form with the username, password, and partition bound before saving](/img/connectors/catalog/erp-business/pricefx/example/ballerinax_pricefx_screenshot_02_connection_form.png)

### Step 4: Save the connection

Select **Save Connection** and verify that the connection appears in the **Connections** section.

![Pricefx connection visible after saving](/img/connectors/catalog/erp-business/pricefx/example/ballerinax_pricefx_screenshot_03_connections_list.png)

### Step 5: Set actual values for your configurables

1. Select **Configurations** at the bottom of the project tree under **Data Mappers**.
2. Enter a value for each configurable listed below before you run the integration.

- **username** (`string`) : Your Pricefx username.
- **password** (`string`) : Your Pricefx password.
- **partition** (`string`) : Your Pricefx partition name.

## Configuring the Pricefx List Price List Types operation

### Step 6: Add an automation entry point

1. In the left panel under **Entry Points**, select **+** (**Add Entry Point**).
2. Under **Automation**, select **Automation**.
3. In the **Create New Automation** dialog, accept the default settings and select **Create**.

The canvas switches to the Automation flow view, showing a Start node, an Error Handler node, and an End node.

### Step 7: Select the List Price List Types operation

1. In the automation flow body on the canvas, select the **+** (Add Step) button between the Start and Error Handler nodes to open the step-addition panel.
2. Under **Connections** in the step panel, select the **pricefxClient** connection node to expand it and reveal all available Pricefx API operations.

![Pricefx connection expanded to display operations before selection](/img/connectors/catalog/erp-business/pricefx/example/ballerinax_pricefx_screenshot_04_operations_panel.png)

3. Select **List Price List Types** from the list. This operation has no required parameters, so only the result variable needs a name.

- **Result** : The name of the variable that holds the returned price list types.

![Pricefx List Price List Types operation with the result variable set before saving](/img/connectors/catalog/erp-business/pricefx/example/ballerinax_pricefx_screenshot_05_operation_form.png)

4. Select **Save** to add the Pricefx operation step to the automation flow.

### Step 8: Log the List Price List Types result

Add a log action for the returned value, then return to the visual flow.

![Completed Pricefx flow with the configured operation](/img/connectors/catalog/erp-business/pricefx/example/ballerinax_pricefx_screenshot_06_completed_flow.png)

## Try it yourself

Try this sample in WSO2 Integration Platform.

[![Deploy to Devant](https://openindevant.choreoapps.dev/images/DeployDevant-White.svg)](https://console.devant.dev/new?gh=wso2/integration-samples/tree/main/integrator-default-profile/connectors/pricefx_connector_sample)

[View source on GitHub](https://github.com/wso2/integration-samples/tree/main/integrator-default-profile/connectors/pricefx_connector_sample)
Comment thread
RDPerera marked this conversation as resolved.

## More code examples

The `Pricefx` connector offers practical examples illustrating its use in various scenarios.
Explore these [examples](https://github.com/ballerina-platform/module-ballerinax-pricefx/tree/main/examples/), covering the following use cases:

1. [Product catalog management](https://github.com/ballerina-platform/module-ballerinax-pricefx/tree/main/examples/product-catalog-management): Add a new product to the catalog, update one of its fields, then list matching products to confirm the change.
2. [Customer quote workflow](https://github.com/ballerina-platform/module-ballerinax-pricefx/tree/main/examples/customer-quote-workflow): Add a new customer, create a quote for them, then submit the quote for approval.
3. [Price list calculation](https://github.com/ballerina-platform/module-ballerinax-pricefx/tree/main/examples/price-list-calculation): Create a new price list, run its calculation, then fetch the calculated price list.
4. [Attachment upload workflow](https://github.com/ballerina-platform/module-ballerinax-pricefx/tree/main/examples/attachment-upload-workflow): Create an upload slot for a customer record, upload a file to it, then list the customer's files.
39 changes: 39 additions & 0 deletions en/docs/connectors/catalog/erp-business/pricefx/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
connector: true
connector_name: "pricefx"
title: "Pricefx"
description: "Overview of the ballerinax/pricefx connector for WSO2 Integrator."
---

[Pricefx](https://www.pricefx.com/) is a cloud-native pricing and revenue management platform that helps enterprises manage price lists, calculation grids, quotes, contracts, and rebate agreements across their sales organization. The `ballerinax/pricefx` connector provides a client for the [Pricefx Backend API](https://api.pricefx.com/), covering master data (products, customers, sellers), pricing (price lists, manual price lists, calculation grids, condition records), sales (quotes, contracts, rebate agreements, sales compensations), and platform administration (users, workflow, data manager, notifications, comments, custom forms, and more).

## Key Features

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use sentence case for the H2 heading.

Change ## Key Features to ## Key features.

As per path instructions, non-H1 headings must use sentence case.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@en/docs/connectors/catalog/erp-business/pricefx/overview.md` at line 10,
Update the H2 heading in the Pricefx overview documentation from title case to
sentence case, changing “Key Features” to “Key features” while preserving the
heading level.

Source: Path instructions


- Manage products, customers, sellers, and their extension fields
- Create, calculate, and manage price lists, manual price lists, and calculation grids
- Build quotes, submit and revoke them, and convert them to deals
- Manage contracts (agreements and promotions) and rebate agreements
- Run rebate calculations and manage rebate record groups
- Handle sales compensation plans and records
- Upload, download, and manage attachments and files
- Manage users, business roles, and workflow delegations
- Work with the Data Manager, lookup tables, and key-value stores
- Authenticate with username/password, an API key, OAuth 2.0, or a pre-signed external JWT
- Transparent re-authentication - the client automatically refreshes a short-lived token and retries once whenever a request comes back unauthenticated

## Actions

The connector exposes a single client for interacting with the Pricefx API.

| Client | Actions |
|---|---|
| [`Client`](action-reference.md#client) | Manages Pricefx products, customers, sellers, condition records, price lists, manual price lists, calculation grids, quotes, contracts, rebate agreements and calculations, sales compensations, attachments, users, workflow, data manager, and authentication. |

## Documentation

- [Setup Guide](setup-guide.md) - Get Pricefx credentials
- [Actions](action-reference.md) - Available operations

## How to contribute

Contribute to the connector's development on GitHub: [module-ballerinax-pricefx](https://github.com/ballerina-platform/module-ballerinax-pricefx).
97 changes: 97 additions & 0 deletions en/docs/connectors/catalog/erp-business/pricefx/setup-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
connector: true
connector_name: "pricefx"
title: "Setup Guide"
description: "How to set up and configure the ballerinax/pricefx connector."
---

# Setup Guide

This guide walks you through getting the details the connector needs to authenticate and communicate with your Pricefx partition.

## Choose an authentication method

The connector supports several ways to authenticate with Pricefx. Provide exactly one of the following credential combinations.

### 1. Basic Authentication
Comment thread
coderabbitai[bot] marked this conversation as resolved.

The most common setup, and the one to reach for first.

Your user name, password, and partition are provisioned when your Pricefx account is created - ask your Pricefx administrator if you don't already have them. The partition name also appears in your instance's login URL, in the form `https://<your-node>.pricefx.com/pricefx/<your-partition>`.

You only pay for a Basic authenticated request once: the connector uses your username, password, and partition to bootstrap a session token when the client is created, then reuses that token for every request afterward instead of sending your credentials again.

### 2. JWT Token Authentication

Provide `jwt` on its own - no username, password, or partition needed.

If you already have a non-expiring Pricefx JWT, you can use it directly by setting it as `jwt`.

### 3. OAuth 2.0 Authentication

Provide `clientId`, `refreshToken`, and optionally `clientSecret`.

#### Registering an OAuth client

On the Pricefx side, go to **Administration > Configuration > System Configuration > Advanced Configuration Options** and add a per-partition configuration named `oauthConfiguration` with a value shaped like this:

```json
{
"knownClients": {
"<yourClientName>": {
"redirect_uri": "<the redirect URI your integration listens on>",
"client_secret": "<a secret of your choosing>",
"client_description": "A short label shown on the consent screen"
}
}
}
```

- The key you choose under `knownClients` (`<yourClientName>` above) is the value you set as `clientId`.
- `client_secret`, if you set one, is the value you set as `clientSecret`.
- `redirect_uri` must match wherever your integration is set up to receive the sign-in redirect.

#### Getting a refresh token

`refreshToken` comes from signing in once through Pricefx's OAuth 2.0 consent screen for the client you just registered, and approving access. That sign-in step is interactive (it happens in a browser) and can't be automated by this connector, but it's a one-time setup step - the consent screen hands back a refresh token as part of the exchange, and that's the value you configure here.

Once you have a refresh token, the connector fetches and refreshes access tokens automatically - you never need to repeat that step.

### 4. External JWT Authentication

You can use a third-party JSON Web Token for authentication (for example, with Salesforce as the signer). As with SAML, no hard-coded per-user credentials are needed - instead, a system-to-system trust relationship is established using signed tokens.

#### Configuring the trust relationship

On the Pricefx side, go to **Administration > Configuration > System Configuration > Advanced Configuration Options** and add a per-partition configuration named `externalJWTConfiguration` with a value shaped like this:

```json
{
"entries": {
"<externalSystemName>": {
"publicKey": "<public key used by the external system for signing, in PEM format>",
"permissions": "<null, or a JSON list of permission-name strings>"
}
}
}
```

- **`externalSystemName`** - a JSON-safe name for the external system (letters, digits only - no whitespace). This is the same name you pass as `systemName` to the connector. You can register as many external systems as you like, each under its own name.
- **`publicKey`** - the external system's public key, as a PEM-formatted string. Pricefx only supports RSA keys.
- **`permissions`** - leave `null` (or omit it) to not further restrict permissions beyond what the authenticated user already has. If you provide a list of permission-name strings instead, a token issued under this configuration can only call endpoints whose required permission is in that list.

:::caution
The `permissions` list is only an additional filter, on top of the authenticated user's own permissions - it can't grant a user something they couldn't otherwise do. Use it to restrict a given trust relationship to a narrower set of API calls than the user would normally have access to.
:::

Once the trust relationship is configured, give the connector two values: `systemName`, set to the name you registered above, and `jwt`, set to a JWT signed by that external system.

The connector automatically re-authenticates and retries once whenever a request comes back unauthenticated, so a long-lived client instance keeps working without manual re-initialization.

## Note your service URL

The connector connects to `https://<your-node>.pricefx.com/pricefx/<your-partition>` by default. Confirm your node and partition name with your Pricefx administrator if you're not sure.

## Next steps

- [Actions](action-reference.md) - Available operations
1 change: 1 addition & 0 deletions en/docs/connectors/catalog/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ Find the right connector for your integration. Use the search bar or filter by c
{ name: "PayPal Payments", description: "Payment platform with authorization, capture, void, and refund operations", operations: "Authorize, Capture, Void, Refund, Show Details", auth: "OAuth 2.0 (Client Credentials)", link: "finance-accounting/paypal.payments/paypal-payments-connector-overview", category: "Finance & Accounting", icon: "https://bcentral-packageicons.azureedge.net/images/ballerinax_paypal.payments_2.0.1.png" },
{ name: "PayPal Subscriptions", description: "PayPal recurring billing platform for creating subscription plans and managing subscription lifecycles", operations: "Create, Read, Update, Activate, Deactivate, Suspend, Cancel, Revise, Capture, List", auth: "OAuth 2.0", link: "finance-accounting/paypal.subscriptions/paypal-subscriptions-connector-overview", category: "Finance & Accounting", icon: "https://bcentral-packageicons.azureedge.net/images/ballerinax_paypal.subscriptions_1.0.1.png" },
{ name: "People HR", description: "HR management system with employee records, holidays, salaries, vacancies, applicants, and appraisals", operations: "Create, Read, Update, Delete, Query", auth: "API Key", link: "hrms/peoplehr/people-hr-connector-overview", category: "HRMS", icon: "https://bcentral-packageicons.azureedge.net/images/ballerinax_peoplehr_2.2.1.png" },
{ name: "Pricefx", description: "Cloud-native pricing and revenue management: products, customers, price lists, calculation grids, quotes, contracts, and rebate agreements", operations: "Create, Read, Update, Delete, List, Search, Calculate, Submit", auth: "Username/Password, API Key, OAuth 2.0, External JWT", link: "erp-business/pricefx/overview", category: "ERP & Business" },
{ name: "PostgreSQL", description: "Object-relational database with SQL queries, batch operations, stored procedures, and CDC triggers", operations: "Query, Execute, Batch Execute, Call, CDC", auth: "Username/Password", link: "database/postgresql/connector-overview", category: "Database", icon: "https://bcentral-packageicons.azureedge.net/images/ballerinax_postgresql_1.17.0.png" },
{ name: "RabbitMQ", description: "AMQP 0-9-1 message broker with queue/exchange management, pub/sub, and consumer services", operations: "Publish, Consume, Queue Declare, Exchange Declare, Bind, Ack, Nack", auth: "Username / Password", link: "messaging/rabbitmq/connector-overview", category: "Messaging", icon: "https://bcentral-packageicons.azureedge.net/images/ballerinax_rabbitmq_3.3.3.png" },
{ name: "Redis", description: "In-memory data store with string, list, set, sorted set, and hash operations", operations: "Get, Set, List, Hash, Set, Sorted Set, Key Management", auth: "Password / ACL", link: "database/redis/connector-overview", category: "Database", icon: "https://bcentral-packageicons.azureedge.net/images/ballerinax_redis_3.2.0.png" },
Expand Down
10 changes: 10 additions & 0 deletions en/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1387,6 +1387,16 @@ const sidebars: SidebarsConfig = {
'connectors/catalog/hrms/peoplehr/example',
],
},
{
type: 'category',
label: 'Pricefx',
link: { type: 'doc', id: 'connectors/catalog/erp-business/pricefx/overview' },
items: [
'connectors/catalog/erp-business/pricefx/setup-guide',
'connectors/catalog/erp-business/pricefx/action-reference',
'connectors/catalog/erp-business/pricefx/example',
],
},
{
type: 'category',

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading