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
/entities/Clients
if enabled, deleted Clients are returned as well
Number of entities to return from beginning of the result set. Max: 100. Default: 30
Return only the "last" number of entities from result set. When used with first parameter, then it returns last M records from the first N records.
Cursor until which to take entities to result set.
Cursor after which to start taking entities to result set.
Expand related entity. Use api_names of relation fields. You can use multiple values separated via ',' colon. If not used, URI link will be returned instead. You can use dots '.' to expand nested entities as well.
expand=owner,sales_unit,account_relations.account
Order by values. Use api_name of field to sort by ascending. Prefix api_name with '-' to descending sort. You can use multiple values separated via ',' colon.
order-by=created,-modified
Use name of field in braces to filter by this field. To advanced filter, use with combination with filter-op parameter.
filter[name]=Example
Filter operator. Specify a way how to filter fields. Supported operators: [eq, ieq, not-eq, not-ieq, contains, starts, ends, icontains, istarts, iends, null, not-null, empty, not-empty, gt, gte, lt, lte, between].
filter-op[name]=eq
Loads only fields defined within this parameter. You can use multiple values separated via ',' colon. If not used, then all fields are returned. You can use dots '.' to specify load only fields in nested as well.
load-only=id,name,owner.id
Returns all defined Pipelines
/entities/Pipelines
if enabled, deleted Pipelines are returned as well
Number of entities to return from beginning of the result set. Max: 100. Default: 30
Return only the "last" number of entities from result set. When used with first parameter, then it returns last M records from the first N records.
Cursor until which to take entities to result set.
Cursor after which to start taking entities to result set.
Expand related entity. Use api_names of relation fields. You can use multiple values separated via ',' colon. If not used, URI link will be returned instead. You can use dots '.' to expand nested entities as well.
expand=owner,sales_unit,account_relations.account
Order by values. Use api_name of field to sort by ascending. Prefix api_name with '-' to descending sort. You can use multiple values separated via ',' colon.
order-by=created,-modified
Use name of field in braces to filter by this field. To advanced filter, use with combination with filter-op parameter.
filter[name]=Example
Filter operator. Specify a way how to filter fields. Supported operators: [eq, ieq, not-eq, not-ieq, contains, starts, ends, icontains, istarts, iends, null, not-null, empty, not-empty, gt, gte, lt, lte, between].
filter-op[name]=eq
Loads only fields defined within this parameter. You can use multiple values separated via ',' colon. If not used, then all fields are returned. You can use dots '.' to specify load only fields in nested as well.
load-only=id,name,owner.id
Returns all defined ContactAccountRelations
/entities/ContactAccountRelations
if enabled, deleted ContactAccountRelations are returned as well
Number of entities to return from beginning of the result set. Max: 100. Default: 30
Return only the "last" number of entities from result set. When used with first parameter, then it returns last M records from the first N records.
Cursor until which to take entities to result set.
Cursor after which to start taking entities to result set.
Expand related entity. Use api_names of relation fields. You can use multiple values separated via ',' colon. If not used, URI link will be returned instead. You can use dots '.' to expand nested entities as well.
expand=owner,sales_unit,account_relations.account
Order by values. Use api_name of field to sort by ascending. Prefix api_name with '-' to descending sort. You can use multiple values separated via ',' colon.
order-by=created,-modified
Use name of field in braces to filter by this field. To advanced filter, use with combination with filter-op parameter.
filter[name]=Example
Filter operator. Specify a way how to filter fields. Supported operators: [eq, ieq, not-eq, not-ieq, contains, starts, ends, icontains, istarts, iends, null, not-null, empty, not-empty, gt, gte, lt, lte, between].
filter-op[name]=eq
Loads only fields defined within this parameter. You can use multiple values separated via ',' colon. If not used, then all fields are returned. You can use dots '.' to specify load only fields in nested as well.
load-only=id,name,owner.id
Returns all defined Currencies
/entities/Currencies
if enabled, deleted Currencies are returned as well
Number of entities to return from beginning of the result set. Max: 100. Default: 30
Return only the "last" number of entities from result set. When used with first parameter, then it returns last M records from the first N records.
Cursor until which to take entities to result set.
Cursor after which to start taking entities to result set.
Expand related entity. Use api_names of relation fields. You can use multiple values separated via ',' colon. If not used, URI link will be returned instead. You can use dots '.' to expand nested entities as well.
expand=owner,sales_unit,account_relations.account
Order by values. Use api_name of field to sort by ascending. Prefix api_name with '-' to descending sort. You can use multiple values separated via ',' colon.
order-by=created,-modified
Use name of field in braces to filter by this field. To advanced filter, use with combination with filter-op parameter.
filter[name]=Example
Filter operator. Specify a way how to filter fields. Supported operators: [eq, ieq, not-eq, not-ieq, contains, starts, ends, icontains, istarts, iends, null, not-null, empty, not-empty, gt, gte, lt, lte, between].
filter-op[name]=eq
Loads only fields defined within this parameter. You can use multiple values separated via ',' colon. If not used, then all fields are returned. You can use dots '.' to specify load only fields in nested as well.
load-only=id,name,owner.id
Creates new opportunity
/entities/Opportunities
Specify validation level of opportunity on create. 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.
2019-01-01T00:00:00
2019-01-01T00:00:00
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
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
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
Opportunity label flag.
Options: Priority = 1 (0b001) Hot = 2 (0b010) Stalled = 4 (0b100)
1
1
, 2
, 4
Integer enum value: 0 - Standard, 1 - Private, 2 - AllView, 3 - AllEdit
0
0
, 1
, 2
, 3
Relation to OpptyRecurrence, see: 'createOpptyRecurrenceInput' object for properties.
Relation to OpptyRevenueSchedule, see: 'createOpptyRevenueScheduleInput' object for properties.
Monetary value in a foreign currency.
Relations to Products.
Relations to Contacts.
Relations to Accounts.
Relations to CloudObjects.
Relations to SalesUnits.
Relations to Clients.