Importing Products - Price Variations

2»

Comments

  • avillainno
    avillainno Member Posts: 1 VERIFIED MEMBER
    Second Anniversary First Comment Photogenic
    edited March 2023 #32

    Hello, we at Avilla Innovations can help with these imports at no cost. Schedule a free consultation with us and we will answer all your questions: https://calendly.com/ail-sales/pipedrive-support


    Proud Pipedrive Partner: https://www.pipedrive.com/en/marketplace/partners/avilla-innovations-llc/227

    @Mike van der Valk

  • aikades
    aikades Member Posts: 7 VERIFIED MEMBER
    Name Dropper First Comment Photogenic

    Hello, any update on this @Mike van der Valk?

    I think that as the product is great it lacks several basic functions and one is this, we urgently need the bulk import/export for price variations!

    As many of the previous users I have tons of SKU's with 6 levels of price, adding it manually seems to be an impossible task.

    I hope that after 2 years of requesting it, it can finally see the light for all the pipedrive users!

  • Avilla Support
    Avilla Support Member Posts: 10 VERIFIED MEMBER
    10 Comments First Anniversary Name Dropper Photogenic

    Hello @aikades, we can help with this type of bulk import of multiple price variations.

    You provide us the data in a file. We import all your price variations into your Pipedrive platform using our proprietary automation infrastructure.

    Schedule a free consultation here: https://calendly.com/ail-sales/pipedrive-support

    You can also find us on the Pipedrive marketplace: https://www.pipedrive.com/en/marketplace/partners/avilla-innovations-llc/227

  • Jess Stacey
    Jess Stacey Pipedrive Team Posts: 37 PIPEDRIVE TEAM
    Third Anniversary 25 Likes 10 Comments Name Dropper

    Hi @aikades

    I'm the PM currently working on the Products feature in Pipedrive. We are making ongoing improvements to this feature - we recently adding more flexible tax and discount configuration for Products, and we're currently working on recurring Products to meet the needs of subscriptions, licences and other recurring items that our customers sell.

    We have captured your requests in our research, but unfortunately the problem hasn't made it to the top of our backlog in the short term roadmap, due to other more pressing issues.

    Thanks for the feedback.

    Jess

  • AMDRZM
    AMDRZM Member Posts: 2 VERIFIED MEMBER
    First Comment Photogenic

    I've got the same issue here

  • BlackrazorNZ
    BlackrazorNZ Member Posts: 15 VERIFIED MEMBER
    Third Anniversary 10 Comments Name Dropper 5 Likes

    Same request here - I just imported an 11,000 line spreadsheet which is 750-ish items with multiple price tiers per item. What it did, is create 11,000 items with individual prices, but using the same item code and names.

    Pipedrive would definitely benefit from being able to import Price Variations with the Variation Name from one field and the Variation Price from another.

  • yannski
    yannski Member Posts: 1 VERIFIED MEMBER
    Second Anniversary First Comment Photogenic

    Same problem here. We have hundreds of products and each have several variations. We used to use an API endpoint that was disabled today. Very, very frustrating.

  • Mike B.
    Mike B. Member Posts: 14 VERIFIED MEMBER
    10 Comments Second Anniversary 5 Up Votes Photogenic

    We need this feature as well. Both importing and exporting.

    I was also considering searching for an API, but if there is none (according to @yannski 's post), this feature should become top priority.

  • Orry
    Orry Member Posts: 3 VERIFIED MEMBER
    First Comment

    May as well add another to the pile,

    For us we realised the benefits and uses of variations on products as we provide different pricing for trade customers and retail, so being able to import all of our 1500 products with the variants we need would be highly beneficial and would help when needing to update all of the variation pricing. even a separate import specific for just updating variation data would be much appreciated.

    I've not check through the Pipedrive API yet, there may be away I can utilise this to update variation data, if anyone knows if this is possible or how to set this up that would be a big help.

  • Avilla Support
    Avilla Support Member Posts: 10 VERIFIED MEMBER
    10 Comments First Anniversary Name Dropper Photogenic

    We have built processes to automate these variation imports. If you would like, schedule a free consultation and we'll answer all your questions: https://calendly.com/ail-sales/project-consultation

    Avilla Support,

    Proud Pipedrive Partners

  • Pedro Manuel Gonçalves Franco
    Pedro Manuel Gonçalves Franco Pipedrive Team Posts: 96 PIPEDRIVE TEAM
    Fourth Anniversary 25 Likes 10 Comments First Answer

    Hi @Mike B. and @Orry ,

    Currently, importing products + variations is not available. However, we have made available the Products Variations API in the public API (Link) that could used as a workaround.

    • Get all product variations of a product
    • Add product variation
    • Update Product Variation
    • Delete Product Variation

    Hope it helps while this issue hasn't been tackled 🙏

  • Mike B.
    Mike B. Member Posts: 14 VERIFIED MEMBER
    10 Comments Second Anniversary 5 Up Votes Photogenic

    Hi @Pedro Manuel Gonçalves Franco . This would be "the best next thing".

    My team will test the API soon to see how we can integrate it into our workflows. Thank you for letting us know.

  • Orry
    Orry Member Posts: 3 VERIFIED MEMBER
    First Comment
    edited July 18 #44

    With the help of chatgpt and some fiddling and tweaking I was able to get the following code to work using a shortcode on our website. This will allow you to take the data from a csv file and upload your product variations on pipedrive. All you have to do is have the csv in your file location and then click the button, I'll post another comment after this for the correct headers you need for pipedrive. change all the areas that say [Your….] to what's relevant for you company. One thing to note, with this code, this creates new variation each time and will not update old variations.

    Headers for csv file

    product_id | name | price | currency | cost | notes

    <?php

    function AddVariationsToProducts() {
    $html = '';

    $html .= '<h2>Upload Product Variations</h2>';

    $html .= '<form id="uploadForm" method="post" action="">
    <button type="submit">Upload Product Variations</button>
    </form>';

    $apiToken = '[Your Pipedrive API Key]';
    $csvFile = "[Your CSV File Path]"; // Path to your CSV file

    function addProductVariation($productId, $variationData, $apiToken) {
    $url = "[Your Pipedrive URL]/api/v2/products/{$productId}/variations?api_token={$apiToken}";

    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($variationData));

    $response = curl_exec($ch);

    if (curl_errno($ch)) {
    echo "Error for product ID {$productId}: " . curl_error($ch) . "<br><br>";
    } else {
    $data = json_decode($response, true);
    if ($data['success']) {
    echo "Product variation added successfully for product ID {$productId}.<br><br>";
    } else {
    echo "Failed to add product variation for product ID {$productId}: " . $data['error'] . "<br>";
    }
    }

    curl_close($ch);
    }

    if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $html .= "here - 1 <br><br>";

    if (file_exists($csvFile)) {
    $html .= "File Found <br><br>";
    }

    $html .= $csvFile."<br><br>";


    if (($handle = fopen($csvFile, "r")) !== FALSE) {
    $header = fgetcsv($handle, 1000, ",");
    while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
    $row = array_combine($header, $data);
    echo var_dump($row);
    // Assuming your CSV has a column named 'product_id' for the product ID
    $productId = $row['product_id'];
    unset($row['product_id']); // Remove the product ID from row data

    $variationData = [
    'name' => $row['name'],
    'prices' => [
    [
    'price' => (float)$row['price'], // Cast to float
    'currency' => $row['currency'],
    'cost' => (float)$row['cost'], // Cast to float
    'notes' => $row['notes']
    ]
    ]
    ];

    addProductVariation($productId, $variationData, $apiToken);
    }
    fclose($handle);
    } else {
    $html .= "Failed to open the CSV file.
    ";
    }
    } else {
    $html .= "Invalid request method.
    ";
    }

    return $html;
    }

    add_shortcode('pipedrive-api-variations', 'AddVariationsToProducts');

  • Orry
    Orry Member Posts: 3 VERIFIED MEMBER
    First Comment

    the headers for your csv file are below. the code above will sort them into the correct format for pipedrive's api to accept.

    product_id

    name

    price

    currency

    cost

    notes

    Variant 1

    10

    5

  • Available
    Available Member Posts: 4 VERIFIED MEMBER
    Name Dropper First Comment Photogenic

    Hi @Jess Stacey

    Any news on being able to bulk edit all prices in Pipedrive products? Either via UI or import/export? While we don't have that many products it would be a real pain to go back in and add cost to all prices on products.