Getting All Open Deals

Hello!

I am trying to export data from my account and the information cannot be extracted using the webApp. I contacted Pipedrive support and the engineers were able to extract perfectly the data I need but they cannot send it to me on a daily basis, so I started looking at the API to see if I could do it myself.

I am trying to extract the following fields from my data:

deal_id deal_owner title deal_status probability pipeline stage project_manager planned_date_for_sending_quotation installation_date_(begining) country product_id product_name quantity

Some fields are Pipedrive fields and some are custom and I would like the results to come with only OPEN Deals.

I am able to retrieve the /v1/deals? but I cant find some of the fields above in my “data” array.

Can someone point me in the right direction so I can figure out the next steps?

Thank you!

Hi @EPI_Support,

Welcome to our Developer Community! :wave:
Would it be okay for you to share an example of the data array you are getting, please?
The JSON response you get from the /v1/deals endpoint you are using may have given the fields you are looking for but perhaps in a different way.

1 Like

Hello Nicole,
Thank you for your reply. These are the fields I need:

deal_id deal_owner title deal_status probability pipeline stage project_manager planned_date_for_sending_quotation installation_date_(begining) country product_id product_name quantity

I have a csv file with them sent to me by your team after I requested an extract and I am trying to build the endpoint to replicate it but I am having some issues with some fields.

I am using:

var country = "0dd85663eaa86d5608d0a86f7123f17156f4712e";
var projectManager = "b9d1afc21f0386ccdeb850c034c8c78dbaaa1c23";
var plannedDateSendQuotation = "28ee603ce9d0756b6dbc7b4ab14459c42cccef42";
var installStart = "88a2de7431d10662545a55853478be089a0f2c8e";

var url = 'https://' + companyDomain + '.pipedrive.com/api/v1/deals:(id,user_id:(name),title,status,probability,stage_id,'
     + projectManager + ',' + plannedDateSendQuotation + ',' + installStart +',' + country + ')?status=open&api_token=' + apiToken;

So far I cannot get:

  1. the “name” for the stage_id, I am only getting a number and cant find a way to get the “name”
  2. Cannot find how to get the product name nor product id. And this is really the key issue I am trying to solve. I know that it is possible to export because your engineers have done it but no success on my side for the moment.

I dont know how your team exported the table they sent me but I know that with the webApp is not possible. If the way your team does it is via the API, I really would like to know if there is a way to simply get the steps and instructions on how I can do it by myself and the problem will be solved.

Thanks

Hi @EPI_Support,

Can you send me a private message with the details of which team/person you received the export from, please? I can then check up on this for you.

In the meantime, based on what I know,

  1. You can only get the number for the stage when you use the /v1/deals endpoint. To get the name of each stage and its id, you will have to make a call to the GET/v1/stages endpoint.

  2. Similarly for Products, to get the full information like product name and product ID, you will have to make a call to the GET/v1/products endpoint. You can then use the GET/v1/products/{id} to get information about individual products once you have the product_id.

1 Like

Hi @EPI_Support,

My teammate @hem found a few viable solutions that may be able to help you out:

Some of our users resort to integrating with Plecto

There is a way to send the data to Google Sheets and this can be done using Zapier. You can check it out here: Connect your Google Sheets to Pipedrive integration in 2 minutes | Zapier.

Google Sheets > ImportJSON script. It can load data from the API. However, you have to take care of joining the data. Triggers can be written to make the data pull time interval-based or sheet event-based (open, switch tabs).

Alternatively, data can be pulled into an analytics platform like Tableau, PowerBI, or KNIME (opensource) and manipulated to fit the needs.