Create Product, Product Line Item

This tutorial should help you to Create Products (Upload Products to Pipeliner). Before moving forward, make sure your Authentication works and you understand the Key Concepts of the Pipeliner API, and make sure you know how to use API parameters

The Product represents the physical or virtual thing that your company sells. Product is usually defined by name, by SKU (unique identification, stock-keeping unit), and by some other properties like category, unit, etc. Products and their management can be found in Administration.

The Product Line item represents specific relation between Product & Opportunity. At the moment when the Product is linked with the opportunity, we call this relation Product Line Item. On this relation, your salespeople define the Price, Discounts of the Product. Product Line items can be found on Opportunities

Products - Tutorial Assignment

Create new Products in Pipeliner with correct Product Properties like Product name, SKU, product category.

0. Required fields

Required API field NameDescription

name

Name of the Account

allowed_pipelines

Select on which Opportunity Pipelines the product should be enabled. Use 1 for All Pipelines (recommended)

unit_symbol

The name of the unit of measure for the product. You can use custom values like pounds, hours, h, kgs , etc.

1. Prepare Data

Product_category_id

It is optional to use the Product category when creating products. Product category helps to organize products to groups/product families with similar properties like (engines, wheels, etc.). Use the following reguest to retrieve ProductCategories

GET
{{baseUrl}}/entities/ProductCategories

2. Create products

We are going to use Bulk create method to create more Products in the Pipeliner application at once.

[
    {
        "name": "Product 1",
        "allowed_pipelines": 1,
        "unit_symbol": "kg"
    },
    {
        "name": "Product 2",
        "allowed_pipelines": 1,
        "unit_symbol": "pcs"
    },
    {
        "name": "Product 3",
        "allowed_pipelines": 1,
        "unit_symbol": "hours"
    }
]
{
    "success": true,
    "data": [
        "703c7426-c197-4441-beb7-201609ee47af",
        "c4d2428f-f8ef-4f27-abdb-aaf3fe626a89",
        "3648bf8a-6ad8-4057-b404-5d01bfac7dff"
    ]
}

Product Line Items - Tutorial Assignment

Create Opportunity with Product Line items (Product Line Items). Set a correct Price, discount for each of the Product Line items.

Before jumping to this tutorial, you should already understand the process of creating Opportunities inside the Pipeliner Application. If you don´t, read Create Opportunity tutorial beforehand.

Working with Product Line items is supported by this Endpoint {{baseURL}}/entities/OpptyProductRelations/

Basic Use Case: Create Product Line Items on Opportunity

We are going to use the Opportunity values that we prepared in the tutorial Create Opportunity. For Product Line items we need to specify a new attribute in the JSON body - product_relations. This attribute represents the list of products that are going to be linked with the Newly created Opportunity and newly created products from the previous tutorial Products - Tutorial Assignment.

{
    "closing_date": "2019-01-01",
    "name": "New Opportunity",
    "owner_id": "00000000-0000-0000-0000-000000011a7d",
    "step_id": "de115511-5dc1-46c3-86d9-f714457208dd",
    "value": {
        "base_value": 100,
        "currency_id": "c4ca4238-a0b9-0382-0dcc-509a6f75849b"
    },
    "account_relations": [
       {
           "account_id": "0bc376a4-c579-413a-9221-e86e4a134766",
           "is_primary": true
           
       }
    ],
    "contact_relations": [
       {
           "contact_id": "02bdc9f6-4dfb-479e-84ba-f6c3b96c39ba",
           "is_primary":true
       }
    ],
    "product_relations" : [
        {
            "product_id": "703c7426-c197-4441-beb7-201609ee47af",
            "price": 10
        },
        {
            "product_id": "c4d2428f-f8ef-4f27-abdb-aaf3fe626a89",
            "price": 20
        },
        {
            "product_id": "3648bf8a-6ad8-4057-b404-5d01bfac7dff",
            "price": 30
        }
    ]
}

Other Use Cases

Automatically update the final Opportunity value from Products

This is really helpful when your business calculates Opportunity Values only from Products on Opportunity. Then define an opportunity attribute "is_value_auto_calculate": true

Use prices from Product Pricelist

When your sales team updates the pricelist frequently or you don´t know the actual price of the product, you can use Pricelist from Pipeliner to get the Prices automatically, by this opportunity attribute: "product_price_list_id": "id of product pricelist"

To get a product price list ID use this request

GET
{{baseURL}}/entities/ProductPriceLists
{
    "closing_date": "2019-01-01",
    "product_price_list_id": "4c4cf9ab-972a-40bb-a749-74fc64289e52",
    "name": "New Opportunity",
    "owner_id": "00000000-0000-0000-0000-000000011a7d",
    "step_id": "de115511-5dc1-46c3-86d9-f714457208dd",
    "is_value_auto_calculate": true,
    "value": {
        "base_value": 100,
        "currency_id": "c4ca4238-a0b9-0382-0dcc-509a6f75849b"
    },
    "account_relations": [
       {
           "account_id": "0bc376a4-c579-413a-9221-e86e4a134766",
           "is_primary": true
           
       }
    ],
    "contact_relations": [
       {
           "contact_id": "02bdc9f6-4dfb-479e-84ba-f6c3b96c39ba",
           "is_primary":true
       }
    ],
    "product_relations" : [
        {
            "product_id": "703c7426-c197-4441-beb7-201609ee47af"
        },
        {
            "product_id": "c4d2428f-f8ef-4f27-abdb-aaf3fe626a89"
        },
        {
            "product_id": "3648bf8a-6ad8-4057-b404-5d01bfac7dff"
        }
    ]
}

Last updated