Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In the following sections, you will learn how to authenticate, how to create product sets, and how to download and upload competition data via Pricefx API.

Authentication and Required Permissions

To authenticate, use the API Protocol v1 or v2. See the Authentication section of the API documentation.

...

  • Import & Read Competition Data – This allows the user to get Competition Data Product Sets and download data from, and upload data to, the Competition Data table.

  • Import Competition Data – This allows to get Competition Data Product Sets and upload data to the Competition Data table (without the possibility to download them).

Define Product Sets

In Pricefx, as an admin, you can specify products for which you want to receive competition data by using a simple or complex filter. The products are grouped in so-called product sets which can be accessed externally via API.

...

  1. In Pricefx, go to Configuration > System Configuration > External Systems > Competition Data API.

  2. Click the New Product Set button.

  3. Determine the products for which you want to receive competition data. Specify a filter or select products manually. The filter is stored, not the products, so every time the API is called, an up-to-date list of products is returned.

  4. Set the parameters:

    • Name the new product set.

    • Options – Define keys and values containing any extra information (not defined in Pricefx master data) which might be needed to further specify the scope of the required data (e.g., "region":"Asia", "retailer":"Amazon"). The value can be an array (note the 255 character limit). This is optional.

    • Output Elements Mapping – Map Pricefx fields to the corresponding fields in the provider's data structure. Manually edit the Competition Data Provider Field Name column as required. Only selected fields will be sent out via the API. SKU is always selected.

  5. Click Save.

  6. Share the name of the Product Set with the 3rd party data provider. They will need this for retrieving the Product Set (see next step).

Get Competition Data Product Sets

Now you can get the defined Product Sets via Pricefx API. This enables the external data provider to obtain the necessary information on the products for which they will be uploading competition data into Pricefx.

...

Code Block
languagejson
{
    "response": {
        "node": "e2e-node",
        "csrfToken": "",
        "startRow": 0,
        "data": [
            {
                "products": [
                    {
                        "id": "B-0037",
                        "attributes": [
                            {
                                "field": "attribute9",
                                "value": "Belgian Dark Ale"
                            },
                            {
                                "field": "unitOfMeasure",
                                "value": null
                            },
                            {
                                "field": "lastUpdateDate",
                                "value": "2019-07-15T11:18:26"
                            },
                            {
                                "field": "attribute6",
                                "value": "5.68"
                            },
                            {
                                "field": "attribute1",
                                "value": null
                            },
                            {
                                "field": "currency",
                                "value": "EUR"
                            },
                            {
                                "field": "attribute3",
                                "value": "DG_01"
                            },
                            {
                                "field": "attribute2",
                                "value": null
                            },
                            {
                                "field": "sku",
                                "value": "B-0037"
                            }
                        ]
                    },
                    {
                        "id": "B-0040",
                        "attributes": [
                            {
                                "field": "attribute9",
                                "value": "American IPA"
                            },
                            {
                                "field": "unitOfMeasure",
                                "value": null
                            },
                            {
                                "field": "lastUpdateDate",
                                "value": "2019-07-15T11:18:26"
                            },
                            {
                                "field": "attribute6",
                                "value": "1.32"
                            },
                            {
                                "field": "attribute1",
                                "value": null
                            },
                            {
                                "field": "currency",
                                "value": "EUR"
                            },
                            {
                                "field": "attribute3",
                                "value": "DG_03"
                            },
                            {
                                "field": "attribute2",
                                "value": "A"
                            },
                            {
                                "field": "sku",
                                "value": "B-0040"
                            }
                        ]
                    }
                ],
                "options": [
                    {
                        "region": "Asia"
                    }
                ]
            }
        ],
        "endRow": 2,
        "totalRows": 2,
        "status": 0
    }
}

Upload Competition Data to Pricefx

Finally, the 3rd-party provider will send the competition data to Pricefx.

...

Code Block
languagejson
{
  "data": {
    "products": [
      {
        "sku": "PP-0011",
        "label": "Tomato mild",
        "price": 171.50,
        "currency": "JPY",
        "competitor": "Pomodori Italia",
        "competitorSku": "A001",
        "competitionType": "string",
        "country": "Japan",
        "priceUnit": 1,
        "unitOfMeasure": "string",
        "infoDate": "2021-09-20T12:14:28.646Z",
        "additionalInfo1": 0,
        "additionalInfo2": 100,
        "additionalInfo4": "seasonal"
      }
    ]
  }
}

Get Competition Data

You can download the content of the Competition Data table in Pricefx. This way you can also verify that the upload has been successful. The Import & Read Competition Data user role is required for this action.

...