Create Opportunity
Last updated
Last updated
This tutorial should help you create the first Opportunity. 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 Opportunity represents existing potential business for a company. Go to the web Application and Opportunities can be located on the Opportunities screen. Opportunity is always part of the Pipeline and pipeline step.
The Pipeline is the list of steps (eg. First Contact, Proposal, Closed/Won), that represents the life cycle of the opportunity. Set up your first Pipeline
Create Opportunity in the Pipeline within the First Step of the Pipeline. This Opportunity will be Linked with an Account(Company) and multiple Contact that belongs to this Account.
name
Name of the opportunity
owner_id
Id of the User in Pipeliner Application
closing_date
Expected Closing date. When the opportunity should be closed
step_id
ID of the Pipeline step where the Opportunity should be created
value
The business value of Opportunity, eg. dollar amount.
base_value -
The Real Business Value in dollars
currency_id -
The ID of currency saved in Pipeliner
value_foreign -
The value for currency_id (Use only with multicurrency setup)
Load an id of the user with the default sales unit. This user will become the owner of the newly created Opportunity.
We don´t necessarily need to load the default unit id. If only owner_id is specified in the final request, Pipeliner will automatically create the opportunity with the default User´s sales unit. (See step 2. of this tutorial)
Pull Opportunity Pipelines and their steps. Store the ID of the First Step
We are going to search for Accounts by email address. But you can use whatever parameter.
We are going to search for Contacts that are linked to the Account. We are going to use Account_id
from the previous Step and list all contact_id
that exists on the Account
Foreign value (required/optional) - This is the value that the User (SalesPerson) can put into the system. This value is depending on currency_id.
Example: if your salespeople want to have an Opportunity Value in Euro, for currency_id use Euro, into the Foreign value put the amount in Euro
currency_id (Required) - the currency for the opportunity (like dollar, euro, etc.). In Pipeliner there are two types of currencies
Base currency - System currency (the main currency)
Multiple currencies (custom currencies) - When your business works with multiple currencies
base_value (required/optional) - this value is always calculated according to the Base Currency
You can use one of the foreign values, base_value. It depends on what fits you better.
When you define base value, then Foreign Currency is calculated automatically based on Exchange rates
When you define Foreign Currency, then the base value is calculated automatically based on Exchange rates
In this tutorial, we don´t use a multi-currency setup, so we are going to search for the base currency (system currency). To retrieve base currency let´s use the following request. Base currency is flagged as is_base:true
Let´s Take data from Step 1. and use them in the following request to create an Opportunity.
Possible problems
Error on field account_relations. Exactly one 'is_primary' item must be set.
Use is_primary
flag for Account/Contact relation object.
-When creating account relations at least one Account needs to be primary -When creating contact relations at least one Contact needs to be primary
Returns all defined Clients
list of Clients
True when response succeeded, false on error.
true
Page info result set. Please note it is returned only when legacy limit & offset parameters are not used.
Returns all defined Currencies
list of Currencies
True when response succeeded, false on error.
true
Page info result set. Please note it is returned only when legacy limit & offset parameters are not used.
Returns all defined ContactAccountRelations
list of ContactAccountRelations
True when response succeeded, false on error.
true
Page info result set. Please note it is returned only when legacy limit & offset parameters are not used.
Returns all defined Pipelines
list of Pipelines
True when response succeeded, false on error.
true
Page info result set. Please note it is returned only when legacy limit & offset parameters are not used.
Creates new opportunity
data of new Opportunity
Last modification time.
"2019-01-01T00:00:00"
Creation time.
"2019-01-01T00:00:00"
Closing date of the Opportunity.
"2019-01-01"
Multi-line text input field.
"string"
Boolean value.
false
Boolean value.
false
Opportunity label flag.
Options: Priority = 1 (0b001) Hot = 2 (0b010) Stalled = 4 (0b100)
1
Name of the entity and its default text representation.
"string"
Relation to single entity instance.
"01234567-abcd-dcba-ffff-000000000000"
Relation to single entity instance.
"01234567-abcd-dcba-ffff-000000000000"
Relation to single entity instance.
"01234567-abcd-dcba-ffff-000000000000"
Relation to single entity instance.
"01234567-abcd-dcba-ffff-000000000000"
Product sections on Opportunity in json format
Simple text input field.
"string"
Simple text input field.
"string"
Simple text input field.
"string"
Simple text input field.
"string"
Simple text input field.
"string"
Simple text input field.
"string"
Qualitative ranking of the opportunity.
1
Multi-line text input field.
"string"
Relation to single entity instance.
"01234567-abcd-dcba-ffff-000000000000"
Integer enum value: 0 - Standard, 1 - Private, 2 - AllView, 3 - AllEdit
0
Relation to single entity instance.
"01234567-abcd-dcba-ffff-000000000000"
Relation to single entity instance.
"01234567-abcd-dcba-ffff-000000000000"
Boolean value.
false
Revision when entity was lastly changed.
1
Monetary value in a foreign currency.
Relation to OpptyRecurrence, see: 'createOpptyRecurrenceInput' object for properties.
Relation to OpptyRevenueSchedule, see: 'createOpptyRevenueScheduleInput' object for properties.
Relations to Products.
Relations to Contacts.
Relations to Accounts.
Relations to CloudObjects.
"2019-01-01T00:00:00"
"2019-01-01T00:00:00"
Relations to SalesUnits.
Relations to Clients.
Creation confirmation. Returns created opportunity
True when response succeeded, false on error.
true