Put topics about this connector package here.
Always check the ‘How to use the Alumio connector packages’ topic.
Extra information
System documentation: Brightpearl API Reference
Connector package documentation
Table of Contents
-
1. Setting up HTTP Client Brightpearl
- 1.1 Steps
-
2. Subscribing to entities from Brightpearl
- 2.1 Steps
- 2.2 General concept
-
3. Publishing entity to Brightpearl
- 3.1 Steps
- 3.2 General concept
1. Setting up HTTP Client Brightpearl
1.1 Steps
- In Alumio Dashboard, go to Clients → HTTP Clients. Create a new HTTP Client and select Brightpearl Client as the HTTP Client.
- Fill in the Base URL, App Token and Staff Token according to your Brightpearl account.
(For more information, see Brightpearl API Reference) - You can optionally enable logging of request to get the log of the authentication.
- Save the HTTP Client for use.
2. Subscribing to Entities from Brightpearl
2.1 Steps
- Go to Connections → Incoming and create a new incoming configuration and select Brightpearl Subscriber as the subscriber.
- Select the entity you want to subscribe to from Brightpearl.
- Add any request parameters needed to subscribe to the entity.
- You can optionally add a transformer to transform the request parameters into something you will request from Brightpearl.
- Select the Brightpearl HTTP Client to use.
- You can also optionally enable pagination to allow Alumio fetches paginated entities.
2.2 General Concept
We follow Brightpearl documentation on building this connector so you can easily use the connector based on Brightpearl API Reference.
Entity
The entity you want to subscribe to Brightpearl. Please refer to the entities from Brightpearl API Reference page.
Request Parameters
These are the parameters you can provide to get the needed entity based on the Brightpearl API Reference.
Please look at the example below on how to fill Request Parameters field when subscribing Get Brand By Id entity. We can see in the documentation that the end point requires “ID-SET” as a path parameter to define which order we want to fetch the details from.
We set the “ID-SET” by providing it inside the path key in the Request Parameters
Besides “id” in the path parameters, the documentation also has endpoints that use query parameters. For example, Column set and ordering It describes that query parameters, “columns” are required should be defined in the query parameters. So, we need to define it inside the query key in the Request Parameters field. This will be parsed as query parameters.
In Alumio we do it as follows
- Path is the path parameter of the url. For example the {id}.
- Query is defined set of parameters attached to the end of a url.
Example: www.url.com?type=true&start=0
Input Transformer
Any transformer’s set here will be executed before the Request Parameters are loaded. So, you can add any transformer to provide and manipulate the request parameters into anything you need, either as path parameters and/or as query parameters of an entity.
HTTP Client
The HTTP Client configuration you will use to access Brightpearl.
3. Publishing Entity to Brightpearl
3.1 Steps
- Go to Connections → Outgoing, create a new outgoing configuration and select Brightpearl Publisher as the publisher.
- Select the method that you want the publisher to perform with the data.
- Select the Brightpearl entity you want the data to be published to.
- You can optionally add any path data to the request on the key path.
- You can optionally add any query data to the request on the key query.
- You can optionally add any payload data to the request on the key payload.
- Select the HTTP Client to use.
3.2 General Concept
Like the subscriber, the publisher has similar methods on how to use it. The difference is the payload that will be submitted by the publisher originating from the data (from routes, from transformers in outgoing configuration), though you can also add or modify payload using the Request Transformer.
Method
Currently we support Post, Patch, Put and Delete methods on submitting data to Brightpearl.
Entity
We support publishing to most Brightpearl endpoints.
Please refer to Brightpearl API Reference page.
Based on the documentation, some endpoints may need one or more path parameters.
For example, we want to use Order - Order PATCH.
We set the “ID” by providing it inside the path key in the data.
we also need to provide the payload for the Patch we do it in Alumio by filling the key payload in the data.
Alumio will send an API request to Brightpearl as /order-service/order/240312
And body of
- Path is the path parameter of the url. For example the {id}.
- Query is defined set of parameters attached to the end of a url.
Example: www.url.com?type=true&start=0 - Payload is the data contained within a request.
HTTP Client
The HTTP Client configuration you will use to access Brightpearl.