Zapier Integration


Zapier makes it easy for various web apps you're using to pass data to each other automatically. You can use Zapier to automate certain DEAR Inventory activities through so-called Zaps, as the sets of triggers and actions that are defined within Zapier are called. In the context of Zapier, triggers mark the start of a Zap, and actions are the events that occur after triggers are started. For example, you can have DEAR Inventory's New Customer/Updated Customer trigger perform an action that adds a New Customer to a MailChimp mailing list.


Zaps can only have one trigger, but may have one or more actions. For example, a Zap may be triggered in DEAR, the resulting data sent to a third-party application, then some other info can be sent back to DEAR. Zaps can also be triggered from a third-party application, which then leads to an action that updates DEAR Inventory. 


Actions can be any of two types: app actions and search actions. App actions are actions performed by an app while app searches are used to look up information that can then be used in another action. In this article, we refer to app actions and app searches as just actions and searches, respectively.


For more information on Zapier, you may want to check out their comprehensive help documentation at https://zapier.com/help/. The following link may be particularly helpful when creating Zaps: https://zapier.com/help/creating-zap/.


Table of Contents


Prerequisites


DEAR API Integration

[back to top]


To start using Zapier with DEAR, you need to generate an API channel in DEAR.


To create an API integration in DEAR:


  1. Go to Integrations -> API.

  1. On the API Integration page, click the icon on the top right, enter a name for the API (for easy identification, you might want to use Zapier as the API name), and click Create button to generate an API channel.
  2. DEAR then creates the API account ID and key under the Setup tab of the API Integration page. You will need both pieces of information to connect DEAR to Zapier.
      
  3. Click Save.
     

Creating Zaps

[back to top]


There are two ways to set up Zaps in Zapier:

  • Set up a DEAR trigger, then set up an action for a third-party app
  • Set up a trigger in a third-party app, then set up an action in DEAR


DEAR to Third-Party App

[back to top]


As an example, we will set up Zap that is triggered when customers are created in DEAR, then subscribes the new customer to a mailing list in MailChimp.


To set up a Trigger:

  1. On Zapier, click the Make a Zap! button.
  2. Enter a name for the Zap.
  3. Select or search for DEAR from the list of apps.
  4. Select the trigger type from the list. For example, New Customer / Updated Customer, which will be triggered when customers are created or updated.
     


  5. Click Save + Continue.
  6. On the next page, click Connect an Account.
  7. On the Connect an Account window, enter the Account ID and API Key that you generated in DEAR API Integration, then click Yes, Continue.
  8. Back in Zapier, click Continue
  9. On the next page, click either Pull in Samples to test your Zap or Skip this step to  skip the test.

        

To set up an Action:

  1. Select or search for MailChimp from the list of apps.
  2. Select a MailChimp action from the list. For example, Add / Update Subscriber, which adds a subscriber to a MailChimp mailing list.



  3. Click Save & Continue.
  4. On the next page, click Connect an Account.
  5. On the Connect an Account window, enter your MailChimp account name and password, then log on to your MailChimp account.
  6. Back in Zapier, set up the template for the action by selecting the MailChimp mailing list to which you want the add the new customer. You will also need to select the new customer's email address from DEAR, which should already have been retrieved because of the trigger you set up earlier (see To Set Up a Trigger ).
  7. Click Continue.
  8. On the next page, you may either test the zap or skip the test altogether.
  9. Click Finish.
  10. Turn on  the Zap.



Third-Party App to Dear

[back to top]


As an example, we will set up a Zap that is triggered when a new row is added to a spreadsheet in Google Sheets, then inserts the row as a new customer in DEAR.


 To set up a Trigger:

  1. In Zapier, click the Make a Zap! button.
  2. Enter a name for the Zap.
  3. Select or search for Google Sheets from the list of third-party apps.
  4. Select a trigger type from the list. For this example, we will select New or Updated Spreadsheet Row, which is triggered when a new row is added or modified in a spreadsheet.


  5. Click Save + Continue.
  6. On the next page, click Connect an Account.
  7. On the Connect an Account window, enter your Google account name and password, log on to your Google account, click Next, then click Allow to connect Zapier with your Google account. If you're already logged on to your Google account, just select the account, then click Allow on the next page.
  8. Back in Zapier, click Save + Continue, set up the template for the trigger by selecting the spreadsheet and worksheet from where data will be taken and push to DEAR. Optionally, you can select a trigger column, which means that only changes in this particular column will be pushed to DEAR.
  9. Click Continue.
  10. On the next page, Zapier will connect to Google Sheets and select sample spreadsheets from your account to test. Select a sample spreadsheet from the list, then click Continue.


To set up an Action:

  1. Select DEAR.
  2. Select the type of action, then click Save + Continue. For this example, we will select Create Customer, which will create a new customer in DEAR.
  3. Click Connect an Account.
  4. On the Connect an Account window,  enter the Account ID and API Key that you generated in DEAR API Integration, then click Yes, Continue. 
  5. Set up the template for the action by selecting all required fields via the Insert a field button.

  6. Click Continue.
  7. On the next page, you may either test the zap or skip the test altogether.
  8. Click Finish.
  9. Turn on  the Zap.




List of Triggers, Actions, and Searches in DEAR


[back to top]



For your reference, a list of DEAR triggers, actions, and searches that you can use in your Zaps are shown in the table below. 


NO.
TYPE
NAME
DESCRIPTION
1
Trigger
New Customer/Updated Customer
Triggered when customers are created or updated
2
Trigger
New Supplier/Updated Supplier
Triggered when suppliers are created or updated
3
Trigger
New Sale/Updated Sale
Triggered when a selected Sale event is created or updated
4
Trigger
Stock Level Update
Triggered when a change is made to product availability
5
Action
Create Customer
Creates a customer
6
Action
Create Product
Creates a product
7
Action
Create Sale
Creates a sale
8
Action
Create Stock Adjustment
Creates a stock adjustment
9
Action
Create Supplier
Creates a supplier
10
Action
Add Sale Attachment
Adds attachment to Sale
11
Action
Add Sale Pack
Adds pack to Sale
12
Action
Add Sale Payment
Adds payment to Sale
13
Action
Add Sale Shipment
Adds shipment to Sale
14
Action
Update Customer
Updates a Customer
15
Action
Update Sale
Updates a Sale
16
Action
Update Supplier
Updates a Supplier
17
Search
Find a Customer
Search for Customer by name
18
Search
Find an Assembly
Search for Assembly by Status, Sale ID, or other fields
19
Search
Find Sale Payments
Search for sale payments by Sale ID, Order No., Invoice No., or Credit Note No.
20
Search
Find a Product
Search for product name or SKU
21
Search
Find a Sale
Search for sale by ID
22
Search
Find a Sale Extended
Search for sale by Order No., Status, Customer, Invoice No., Customer Reference No., or Credit Note No.
23
Search
Find Product Availability
Search for product availability