younifyd
Menu

Create a custom smart sorting key

Create a custom smart sorting key

POST/smart-sorting-keys

Use it in a workflow

  1. Add a step and choose the SCAYLE Admin connector.
  2. Pick the Create a custom smart sorting key action (under SmartSortingKeys).
  3. Fill in the fields below, then reference the result from later steps as {{createACustomSmartSortingKey.response.data}}.

Fields

baseUrlstring

The API host this action calls. Choose one, or pick Custom to enter your own.

One of/v1https://{{tenant-space}}.admin.api.scayle.cloud/v1/__custom__Default "/v1"

baseUrlCustomstring
bodystring

The request body content (for POST, PUT, PATCH requests).

forwardAllHeadersboolean

If enabled, all headers from the incoming request will be forwarded. Additional headers below will override forwarded ones.

Default false

headerskeyvalue

Extra HTTP headers to include, beyond what this action already declares. These override forwarded or declared headers with the same name.

queryParamskeyvalue

Extra URL query parameters to include, beyond what this action already declares. These override declared query parameters with the same name.

Response

Returns 201 with an object. Read it in later steps with {{createACustomSmartSortingKey.response.data.<field>}}.

keystring

Unique identifier of the smart sorting key.

namestring

Name of the smart sorting key.

descriptionstring

Optional description of the smart sorting key. Omitted in responses when null.

isCustomboolean

Whether this is a custom smart sorting key. Always false for system keys.

weightsobject

Building-block weights on a 1-5 scale. Each value is an integer from 1 to 5.

recencyinteger
recencyInvinteger
stockinteger
stockInvinteger
variantAvailabilityinteger
variantAvailabilityInvinteger
originalPriceinteger
originalPriceInvinteger
discountValueinteger
discountValueInvinteger
discountPercentageinteger
discountPercentageInvinteger
salesinteger
salesInvinteger
revenueinteger
revenueInvinteger
weightedSalesinteger
weightedSalesInvinteger
trendinteger
trendInvinteger
stockAvailabilityinteger
stockAvailabilityInvinteger
variantAvailabilityAdjinteger
variantAvailabilityAdjInvinteger
json
{
  "key": "summer-priority",
  "name": "Summer Priority",
  "weights": {
    "stock": 5,
    "sales": 3,
    "salesInv": 1,
    "variantAvailabilityAdjInv": 1
  },
  "description": "summer priority CSSK",
  "isCustom": true
}

Need more? See the SCAYLE Admin guide for connection setup and behaviour shared by every action.