Recent searches


No recent searches

Can I import products into Sell?



Edited Aug 28, 2023


0

6

6 comments

is there a step by step guide how tom use Products API? i struggle to even find the access to API

0


Hello @...,

The best starting point that I could advise is:

Sell: Making the first call

After starting out with this only then I would go to something more complex like the Products API.

Also, if you are not familiar with making cURL requests, I would suggest that you try to install Postman and make so the requests.

Zendesk APIs with Postman

We would not have any other guides at the moment for Sell or Postman.

Hope that helps!

0


Hello - coming in late to this conversation but...

I recently imported products into Sell using a Zapier-to-Zendesk Sell integration.

This loaded approximately 270 line items, all of which had multiple currencies.

I found it easier to use this (we already had a Zapier license) than using the API in this instance.

Hope this helps.

--

Roland

0


Here's another one.

Can we import Deals along with Products already associated with the deals?

I know the importer will import the Deal but there is no way to map an associated Product - so no go there.

The API - I don't think there is an API on a Deal record that creates/updates the product(s) associated to a deal. Which is weird, because then how does Sell know what products are associated to Deals? A hidden API maybe?

So essentially if I want to import many deals and their associated products, I have to import the deals and then manually add the products.

0


image avatar

David

Zendesk Customer Care

Hi Chad, 

You'll likely need to have a few different steps for this.  

- First you'll need to use the Products API to either retrieve the existing products from Zendesk Sell or to create new products if they don't already exist in the system.
- Then, you'll use the Deals API to associate the products with the deals. This might involve updating a deal with a list of product IDs or creating line items for each product within a deal.

Here's a simplified example of how you might use the API to associate a product with a deal:

POST /v2/deals/{deal_id}/line_items
Authorization: Bearer {access_token}
Content-Type: application/json

{
  "data": {
    "product_id": {product_id},
    "quantity": 1,
    "price": {product_price}
  }
}

In this example, {deal_id}{access_token}{product_id}, and {product_price} would be replaced with your actual deal ID, API access token, product ID, and product price, respectively.

Sell API docs
Deals API docs

Give that a test (adjust as needed)

You can also reach out to the Developer Community to get some help from an API specialist.  

0


Thanks so much David - really appreciate the response :)

I actually figured it out via testing and messing about with the API.

The only way I know how to do this using the API is using the Deal > Orders > Line Items Products Rest API endpoints.

So you need to create a deal first and create any products you have.

Create your Products
Create a Deal
Create an Order associated with the Deal (deal_id)
Create line item(s) with the associated product id (product_id) and associate to the order (order_id)

Remember when creating your line items, the value must calculate correctly (value and variations etc). For example I can't add a line item variation (discount) of -50% if the product discount allowed is only -25%. Same goes for the actual value calculation - it needs to add up with respect to the product selling price, product quantity etc.

It's a little cumbersome but it works. The key is to structure your import data accordingly with the correct variables etc.

0


Please sign in to leave a comment.