This repository contains scripts that I have compiled
This will update the account balance of customers from their barcode. it uses the balances.csv file to input data.
node accountBalance.js :accessToken :environment :companyId :timeDelay| Argument | Values Accepted | Default Value |
|---|---|---|
| accessToken | Bearer Token for authentication | |
| environment | dev or prod | dev |
| companyId | The companyId of the account | |
| timeDelay | API request time delay | 300 |
This will append attributes onto an entire accounts' item types. This will not affect currently assigned attributes.
You must provide an attribute array directly into the code
node addAttributes.js :accessToken :environment| Argument | Values Accepted | Default Value |
|---|---|---|
| accessToken | Bearer Token for authentication | |
| environment | dev or prod | dev |
This will mark sale orders as collected in a specified account. sale orders can be omitted using their sale ID. It uses ignore.csv to input data.
node collectItems.js :accessToken :environment :timeDelay :locationId| Argument | Values Accepted | Default Value |
|---|---|---|
| accessToken | Bearer Token for authentication | |
| environment | dev or prod | dev |
| timeDelay | API request time delay | 0 |
| locationId | The locationID to collect items from |
This will check the value of inventory displayed on the item list, compared to the data in an items location data.
node confirmStock.js :accessToken :environment :timeDelay| Argument | Values Accepted | Default Value |
|---|---|---|
| accessToken | Bearer Token for authentication | |
| environment | dev or prod | dev |
| timeDelay | API request time delay | 250 |
This will copy the mappings from 1 channel to another.
node copyMappings.js :accessToken :fromChannel :toChannel :companyID| Argument | Values Accepted | Default Value |
|---|---|---|
| accessToken | Bearer Token for authentication | |
| fromChannel | The channel ID to copy mappings from | |
| toChannel | The channel ID to copy mappings to | |
| companyId | The companyId of the account |
This will create item types from a list of names provided. It uses the itemtypes.csv file to input data.
node createItemTypes.js :accessToken :environment :timeDelay| Argument | Values Accepted | Default Value |
|---|---|---|
| accessToken | Bearer Token for authentication | |
| environment | dev or prod | dev |
| timeDelay | API request time delay | 300 |
This will work through every listing in a channel and remove all of the overides, or selected ones depending on configuration.
node listingOveride.js :accessToken :environment :channelId| Argument | Values Accepted | Default Value |
|---|---|---|
| accessToken | Bearer Token for authentication | |
| environment | dev or prod | dev |
| channelId | Channel ID to remove the overides from |
removeImages.js This script will remove the images from items where their ID is specified in removeimages.csv
node removeImages.js :accessToken :environment| Argument | Values Accepted | Default Value |
|---|---|---|
| accessToken | Bearer Token for authentication | |
| environment | dev or prod | dev |
This will test the horizontal scaling of the sales service. This ensures that more services/workers are started when lag could be experienced. only the account causing the lag should be affected.
node salesScaleTest.js :accessToken :environment| Argument | Values Accepted | Default Value |
|---|---|---|
| accessToken | Bearer Token for authentication | |
| environment | dev or prod | dev |
This will take this CSV listings.csv of SKUs and schedule them to sync in a defined channel
node scheduleSync.js :accessToken :environment :timeDelay| Argument | Values Accepted | Default Value |
|---|---|---|
| accessToken | Bearer Token for authentication | |
| environment | dev or prod | dev |
This will take this CSV skuinput.csv of existing SKUs and the SKUs to change to. It will search for the existing SKU, if found it will update it to the new value.
node skuChange.js :accessToken :environment :searchMethod :timeDelay| Argument | Values Accepted | Default Value |
|---|---|---|
| accessToken | Bearer Token for authentication | |
| environment | dev or prod | dev |
| searchMethod | exact or contain | |
| timeDelay | API request time delay | 100 |
This will run through all the sale orders of an account, getting 100 at a time, then patching an empty body. This updates the sale order. Originally used to hot-fix a sale order bug.
node updateSaleOrders.js :accessToken :environment :timeDelay| Argument | Values Accepted | Default Value |
|---|---|---|
| accessToken | Bearer Token for authentication | |
| environment | dev or prod | dev |
| timeDelay | API request time delay | 100 |
This will work through all of the item types in an account and effectively click save on them. This resolves any issues with attributes showing that are deleted on items.
node updateTypes.js :accessToken :environment| Argument | Values Accepted | Default Value |
|---|---|---|
| accessToken | Bearer Token for authentication | |
| environment | dev or prod | dev |
This will work through an accounts variances and resolve them so that no inventory changes occur.
node varianceResolve.js :accessToken| Argument | Values Accepted | Default Value |
|---|---|---|
| accessToken | Bearer Token for authentication |