← DEAR Systems + Go integrations

Run Go Code with Go API on New Product from DEAR Systems API

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

Trigger workflow on
New Product from the DEAR Systems API
Next, do this
Run Go Code with the Go API
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜

Trusted by 500,000+ developers from startups to Fortune 500 companies

Adyen logo
Brex logo
Carta logo
Checkr logo
Chameleon logo
DevRev logo
LinkedIn logo
Netflix logo
New Relic logo
OnDeck logo
Replicated logo
Scale AI logo
Teamwork logo
Warner Bros. logo
Xendit logo

Developers Pipedream

Getting Started

This integration creates a workflow with a DEAR Systems trigger and Go action. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Select this integration
  2. 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
  3. Configure the Run Go Code action
    1. Connect your Go account
  4. Deploy the workflow
  5. Send a test event to validate your setup
  6. Turn on the trigger

Details

This integration uses pre-built, source-available components from Pipedream's GitHub repo. These components are 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.

Trigger

Description:Emit new event when a product is created
Version:0.0.2
Key:dear-new-product

DEAR Systems Overview

With the DEAR Systems API, you can build a range of applications that can
automate your business processes. Below are some examples of what you can
build:

  • An application to automatically generate invoices and send them to customers
  • A system to track inventory levels and send alerts when levels are low
  • An app to manage sales orders and send shipping notifications
  • A tool to streamline your purchasing process by integrating with supplier
    systems

Trigger 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.2",
  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;
    },
  },
};

Trigger 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 executions.
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

Trigger 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.

Action

Description:Run any Go code and use any Go package available with a simple import. Refer to the [Pipedream Go docs](https://pipedream.com/docs/code/go) to learn more.
Version:0.0.2
Key:go-run-go-code

Action Code

import go from "../../go.app.mjs";

export default {
  name: "Run Go Code",
  version: "0.0.2",
  key: "go-run-go-code",
  description: "Run any Go code and use any Go package available with a simple import. Refer to the [Pipedream Go docs](https://pipedream.com/docs/code/go) to learn more.",
  props: {
    go,
  },
  type: "action",
  methods: {},
  async run({ $ }) {
    // Placeholder action for Go code app
  },
};

Action Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI.

LabelPropTypeDescription
GogoappThis component uses the Go app.

Action Authentication

The Go API does not require authentication.

About Go

Anything you can do in Go, you can do in a Pipedream Workflow. You can use any of Go packages available with a simple import.

More Ways to Connect Go + DEAR Systems

Run Go Code with Go API on New Authorized Sale Order from DEAR Systems API
DEAR Systems + Go
 
Try it
New Authorized Sale Order from the DEAR Systems API

Emit new event when a sale order is created and authorized

 
Try it
New Product from the DEAR Systems API

Emit new event when a product is created

 
Try it
Run Go Code with the Go API

Run any Go code and use any Go package available with a simple import. Refer to the Pipedream Go docs to learn more.

 
Try it