> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alumio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SPS Commerce

> Connect Alumio to SPS Commerce.

## Extra information

System documentation:

## Connector package documentation

**SPS Commerce**

# Setting up HTTP Client for SPS Commerce

## Steps

1. In Alumio Dashboard, go to Clients > HTTPS Client. Create a new HTTP Client and select SPS Commerce HTTP Client as the prototype of the HTTP Client.
2. Fill in the Base URI (Example : [https://api.spscommerce.com](https://api.spscommerce.com)).
3. Fill in the Client ID and Secret.
4. Press “Grant access to SPS Commerce”
5. Save and Continue.

# Subscribing to Entities from SPS Commerce

## Steps

1. Go to Connections -> Incoming and create a new incoming configuration and select SPS Commerce Subscriber as the subscriber.
2. Select the entity you want to subscribe from SPS Commerce.
3. Add any request parameters needed to subscribe to the entity (optional).
4. You can optionally add a transformer to transform the request parameters into something you need.
5. Select the SPS Commerce HTTP Client to use

## General Concept

We follow SPS Commerce documentation on building this connector so you can easily use the connector based on SPS Commerce API Reference.

**Entity**
It’s the entity you want to subscribe from SPS Commerce. Please refer to the entities in Management APIs from SPS Commerce API Reference page.

**Request Parameters**
These are the parameters you can provide to get the needed entity based on SPS Commerce API Reference. Please look at the example below on how to fill the Request Parameters field when subscribing “Get Shipping Labels by label ID”

<img src="https://mintcdn.com/alumio/2XcHi1eVMdbU3dfQ/images/connectors/sps-commerce-01.png?fit=max&auto=format&n=2XcHi1eVMdbU3dfQ&q=85&s=717d59b5f3f1b79e93be4e66c4aada76" alt="SPS Commerce connector screenshot 1" width="690" height="398" data-path="images/connectors/sps-commerce-01.png" />

<img src="https://mintcdn.com/alumio/2XcHi1eVMdbU3dfQ/images/connectors/sps-commerce-02.png?fit=max&auto=format&n=2XcHi1eVMdbU3dfQ&q=85&s=ca63e44769898c9d4080277d0d5aa40b" alt="SPS Commerce connector screenshot 2" width="690" height="376" data-path="images/connectors/sps-commerce-02.png" />

That’s why we need to define the **label-id** property inside the **path** property in the Request Parameters field. The properties inside **query** parameters will be parsed as query parameters. The properties inside **payload** parameters will be parsed as payload. Here is the final URL that will be called when using such Request Parameters field.

/label/v1/1234567

**Input Transformer**
Any transformers set here will be executed after the Request Parameters are loaded. So, you basically can add any transformer to provide and transform the request parameters into anything you need either as path parameters and/or as query parameters of an entity.

**HTTP Client**
It’s the HTTP Client configuration or prototype you will use to access SPS Commerce.

# Publishing Entity to SPS Commerce

## Steps

1. Go to Connections -> Outgoing, create a new outgoing configuration, and select SPS Commerce Publisher as the publisher.
2. Select the action that you want the publisher to do with the data.
3. Select the SPS Commerce entity you want the data to be published.
4. Select the HTTP Client to use.
   <img src="https://mintcdn.com/alumio/2XcHi1eVMdbU3dfQ/images/connectors/sps-commerce-03.png?fit=max&auto=format&n=2XcHi1eVMdbU3dfQ&q=85&s=8446d891e84084b1b014048586ebcb0e" alt="SPS Commerce connector screenshot 3" width="690" height="245" data-path="images/connectors/sps-commerce-03.png" />

## 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).

**Entity**
We support publishing to most SPS Commerce Command. Please refer to the entities in Management APIs from the SPS Commderce API Reference page. Based on the documentation, some endpoints may need one or more path parameters.

For Endpoints that require an object as the request payload, please look at the example below. For example, we want to Delete Transaction. Please select “Delete Transaction” as the entity of the publisher.

<img src="https://mintcdn.com/alumio/2XcHi1eVMdbU3dfQ/images/connectors/sps-commerce-04.png?fit=max&auto=format&n=2XcHi1eVMdbU3dfQ&q=85&s=adc7bab5417215a392bb396ba6d0f7e0" alt="SPS Commerce connector screenshot 4" width="690" height="245" data-path="images/connectors/sps-commerce-04.png" />

<img src="https://mintcdn.com/alumio/2XcHi1eVMdbU3dfQ/images/connectors/sps-commerce-05.png?fit=max&auto=format&n=2XcHi1eVMdbU3dfQ&q=85&s=8079f86cb191fb0feefd75310d857c52" alt="SPS Commerce connector screenshot 5" width="690" height="314" data-path="images/connectors/sps-commerce-05.png" />

You can put the Path object as **file-path.**

**HTTP Client**
It’s the HTTP Client configuration or prototype you will use to access SPS Commerce.
