← DEAR Systems

New Product from DEAR Systems API

Pipedream makes it easy to connect APIs for DEAR Systems and 900+ other apps remarkably fast.

Trigger workflow on
New Product from the DEAR Systems API
Next, do this
Connect to 900+ APIs using code and no-code building blocks
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜
Trusted by 250,000+ developers from startups to Fortune 500 companies:
Trusted by 250,000+ developers from startups to Fortune 500 companies

Developers Pipedream

Getting Started

Trigger a workflow on New Product with DEAR Systems API. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Configure the New Product trigger
    1. Connect your DEAR Systems account
    2. Configure timer
    3. Optional- Configure Starting with SKU
    4. Optional- Configure Starting with Name
  2. Add steps to connect to 900+ APIs using code and no-code building blocks
  3. Deploy the workflow
  4. Send a test event to validate your setup
  5. Turn on the trigger

Integrations

Send Message with Discord Webhook API on New Product from DEAR Systems API
DEAR Systems + Discord Webhook
 
Try it
Add Multiple Rows with Google Sheets API on New Product from DEAR Systems API
DEAR Systems + Google Sheets
 
Try it
Get Film with SWAPI - Star Wars API on New Product from DEAR Systems API
DEAR Systems + SWAPI - Star Wars
 
Try it
Create Multiple Records with Airtable API on New Product from DEAR Systems API
DEAR Systems + Airtable
 
Try it
Send any HTTP Request with HTTP / Webhook API on New Product from DEAR Systems API
DEAR Systems + HTTP / Webhook
 
Try it

Details

This is a pre-built, open source component from Pipedream's GitHub repo. The component is developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

New Product on DEAR Systems
Description:Emit new event when a product is created
Version:0.0.1
Key:dear-new-product

Code

import base from "../common/polling.mjs";
import constants from "../../common/constants.mjs";
import {
  pick,
  pickBy,
} from "lodash-es";

export default {
  ...base,
  name: "New Product",
  key: "dear-new-product",
  type: "source",
  description: "Emit new event when a product is created",
  version: "0.0.1",
  dedupe: "unique",
  props: {
    ...base.props,
    sku: {
      type: "string",
      label: "Starting with SKU",
      description: "Filter products with the *SKU* starting with this value",
      optional: true,
    },
    name: {
      type: "string",
      label: "Starting with Name",
      description: "Filter products with the *Name* starting with this value",
      optional: true,
    },
  },
  methods: {
    ...base.methods,
    defaultParams() {
      const params = pickBy(pick(this, [
        "sku",
        "name",
      ]));
      params.page = 1;
      return params;
    },
    getMetadata(product) {
      const {
        SKU: sku,
        ID: id,
        LastModifiedOn: ts,
        Name: name,
      } = product;

      return {
        id: `${sku}_${id}`,
        ts,
        summary: `New product: ${name}`,
      };
    },
    async pollFunction(params) {
      const data = [];

      while (true) {
        console.log(`Retrieving list of products for page ${params.page}`);
        const { Products: products } = await this.dear.listProducts({
          params: {
            ...params,
            limit: constants.PAGE_LIMIT,
          },
        });

        console.log(`Retrieved ${products.length} product(s).`);
        data.push(...products);

        if (products.length < constants.PAGE_LIMIT) {
          console.log("Exausted list of products. Exiting.");
          break;
        }

        console.log("Requesting next page of products.");
        params.page++;
      }

      return data;
    },
  },
};

Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
DEAR SystemsdearappThis component uses the DEAR Systems app.
N/Adb$.service.dbThis component uses $.service.db to maintain state between component invocations.
timer$.interface.timer
Starting with SKUskustring

Filter products with the SKU starting with this value

Starting with Namenamestring

Filter products with the Name starting with this value

Authentication

DEAR Systems uses API keys for authentication. When you connect your DEAR Systems account, Pipedream securely stores the keys so you can easily authenticate to DEAR Systems APIs in both code and no-code steps.

To use the API you will need your DEAR Account ID and API Application key. These can be created on the API setup page inside DEAR Inventory application.

About DEAR Systems

DEAR Inventory is a comprehensive inventory control application positioned as a complete back end management system with product planning, cost and development, manufacturing, sales, shipping and payment features.

More Ways to Use DEAR Systems

Triggers

New Authorized Sale Order from the DEAR Systems API

Emit new event when a sale order is created and authorized

 
Try it