LogoLogo
HomeSupport centerAPP
  • Overview
    • Quick Start
    • About the API
    • Authentication
  • API Reference
    • REST API
    • GraphQL API
  • Core API Concepts
    • Understanding the CRM Concept
    • Fields
    • API parameters
    • Dates
    • Pagination
    • Bulk Create, Update, Delete
    • Webhooks(Real-time updates)
  • Tutorials & Articles
    • Create Account
    • Create Contact
    • Create Opportunity
    • Create Product, Product Line Item
    • Create Custom Entity Record
    • Upload Document
    • Merging Accounts/Contacts
Powered by GitBook
On this page
  1. Tutorials & Articles

Create Product, Product Line Item

PreviousCreate OpportunityNextCreate Custom Entity Record

Last updated 1 year ago

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

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 Name
Description

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

[
    {
        "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.

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

Basic Use Case: Create Product Line Items on Opportunity

{
    "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"
        }
    ]
}

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

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

We are going to use the Opportunity values that we prepared in the tutorial . 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 .

Bulk create method
Create Opportunity
Create Opportunity
Products - Tutorial Assignment
Authentication
Key Concepts
API parameters
Products: Management of Products is located in Admistration
Product Line Items: Products can be used on Opportunities by salespeople, when selling to the Customers
Example how the Product Line items look on Opportunity
Auto calculation of Price is Enabled
Product 1..3 prices in PriceList
Prices are automatically popupalted for a specified pricelist
  • Products - Tutorial Assignment
  • 0. Required fields
  • 1. Prepare Data
  • 2. Create products
  • POST/entities/Products/batch-modify
  • Product Line Items - Tutorial Assignment
  • Basic Use Case: Create Product Line Items on Opportunity
  • Other Use Cases
post

Create or update an batch of Products

Query parameters
validation-levelinteger · int32Optional

Specify validation level of Products on change. Use them as bit mask: 0 - validate each field on entity, 2 - validate only changed fields, 4 - validate only system fields, 8 - allows to override readonly fields, 16 - allows to set entity on deleted relationship.

rollback-methodinteger · int32Optional

Specify rollback method for Products. 0 - rollback all, 1 - rollback only failed records.

Body
allowed_pipelinesinteger · enumOptional

Integer enum value: 1 - All, 2 - Selected

Example: 1Possible values:
descriptionstringOptional

Multi-line text input field.

Example: string
namestringOptional

Generic field wrapping sqlalchemy column, configurable by constructor. Good for one-of fields / generated fields.

Example: string
picture_idstring · uuidOptional

Relation to single entity instance.

Example: 01234567-abcd-dcba-ffff-000000000000
product_category_idstring · uuidOptional

Relation to single entity instance.

Example: 01234567-abcd-dcba-ffff-000000000000
product_type_idstring · uuidOptional

Relation to single entity instance.

Example: 01234567-abcd-dcba-ffff-000000000000
skustringOptional

Simple text input field.

Example: string
unit_symbolstringOptional

Simple text input field.

Example: string
revisioninteger · int32Optional

Revision when entity was lastly changed.

Example: 1
picture_source_urlstringOptional

Source url of picture. If filled url is loaded and checked content. Currently supports only pictures!!

Example: string
idstring · uuidOptional

ID of object to update.

Responses
200
Creation confirmation. Returns a list of created / updated Products
application/json
500
unexpected error
application / json
post
POST /api/v100/rest/spaces/<space_id>/entities/Products/batch-modify HTTP/1.1
Host: us-east.pipelinersales.com
Content-Type: application / json
Accept: */*
Content-Length: 2

[]
{
  "success": true,
  "data": [
    "123e4567-e89b-12d3-a456-426614174000"
  ]
}