mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-08-06 15:59:59 +08:00
306 lines
19 KiB
JSON
306 lines
19 KiB
JSON
{
|
||
"sections": [
|
||
"title",
|
||
"description",
|
||
"fields",
|
||
"special_access_rules",
|
||
"usage",
|
||
"associated_objects",
|
||
"wsdl_segment",
|
||
"field_reference"
|
||
],
|
||
"title": "OpportunityLineItem - Data API",
|
||
"description": "Represents an opportunity line item, which is a member of the list of Product2 products associated with an Opportunity.",
|
||
"fields_columns": [
|
||
"type",
|
||
"properties",
|
||
"description",
|
||
"relationship_name",
|
||
"relationship_type",
|
||
"refers_to"
|
||
],
|
||
"fields": {
|
||
"CanUseQuantitySchedule": {
|
||
"type": "boolean",
|
||
"properties": "Defaulted on create, Filter, Group, Sort",
|
||
"description": "Indicates whether the opportunity product can have a quantity schedule (true) or not (false). This field is read-only."
|
||
},
|
||
"CanUseRevenueSchedule": {
|
||
"type": "boolean",
|
||
"properties": "Defaulted on create, Filter, Group, Sort",
|
||
"description": "Indicates whether the opportunity product can have a revenue schedule (true) or not (false). This field is read-only."
|
||
},
|
||
"ConnectionReceivedId": {
|
||
"type": "reference",
|
||
"properties": "Filter, Group, Nillable, Sort",
|
||
"description": "ID of the PartnerNetworkConnection that shared this record with your organization. This field is available if you enabled Salesforce to Salesforce."
|
||
},
|
||
"ConnectionSentId": {
|
||
"type": "reference",
|
||
"properties": "Filter, Group, Nillable, Sort",
|
||
"description": "ID of the PartnerNetworkConnection that you shared this record with. This field is available if you enabled Salesforce to Salesforce. This field is supported using API versions earlier than 15.0. In all other API versions, this field’s value is null. You can use the new PartnerNetworkRecordConnection object to forward records to connections."
|
||
},
|
||
"CurrencyIsoCode": {
|
||
"type": "picklist",
|
||
"properties": "Defaulted on create, Filter, Group, Restricted picklist, Sort",
|
||
"description": "Available only for organizations with the multicurrency feature enabled. Contains the ISO code for any currency allowed by the organization. If the organization has multicurrency enabled, and a Pricebook2 isn’tspecified on the parent opportunity (that is, the Pricebook2Id field is blank on the opportunity referenced by this object’s OpportunityId), then the value of this field must match the currency of the CurrencyIsoCode field on the PricebookEntry records that are associated with this object."
|
||
},
|
||
"Description": {
|
||
"type": "string",
|
||
"properties": "Create, Filter, Group, Nillable, Sort, Update",
|
||
"description": "Text description of the opportunity line item. Limit: 255 characters."
|
||
},
|
||
"Discount": {
|
||
"type": "percent",
|
||
"properties": "Create, Filter, Nillable, Sort, Update",
|
||
"description": "Discount for the product as a percentage. When updating these records: If you specify Discount without specifying TotalPrice, the TotalPrice is adjusted to accommodate the new Discount value, and the UnitPrice is held constant. If you specify both Discount and Quantity, you must also specify either TotalPrice or UnitPrice so the system knows which one to automatically adjust."
|
||
},
|
||
"HasQuantitySchedule": {
|
||
"type": "boolean",
|
||
"properties": "Defaulted on create, Filter, Group, Sort",
|
||
"description": "Read-only. Indicates whether a quantity schedule has been created for this object (true) or not (false)."
|
||
},
|
||
"HasRevenueSchedule": {
|
||
"type": "boolean",
|
||
"properties": "Defaulted on create, Filter, Group, Sort",
|
||
"description": "Indicates whether a revenue schedule has been created for this object (true) or not (false). If this object has a revenue schedule, the Quantity and TotalPrice fields can’t be updated. In addition, the Quantity field can’t be updated if this object has a quantity schedule. Update requests aren’t rejected but the updated values are ignored."
|
||
},
|
||
"HasSchedule": {
|
||
"type": "boolean",
|
||
"properties": "Defaulted on create, Filter, Group, Sort",
|
||
"description": "If either HasQuantitySchedule or HasRevenueSchedule is true, this field is also true."
|
||
},
|
||
"LastReferencedDate": {
|
||
"type": "datetime",
|
||
"properties": "Filter, Nillable, Sort",
|
||
"description": "The timestamp for when the current user last viewed a record related to this record. Available in API version 50.0 and later."
|
||
},
|
||
"LastViewedDate": {
|
||
"type": "datetime",
|
||
"properties": "Filter, Nillable, Sort",
|
||
"description": "The timestamp for when the current user last viewed this record. If this value is null, this record might only have been referenced (LastReferencedDate) and not viewed. Available in API version 50.0 and later."
|
||
},
|
||
"ListPrice": {
|
||
"type": "currency",
|
||
"properties": "Filter, Nillable, Sort",
|
||
"description": "Corresponds to the UnitPrice on the PricebookEntry that is associated with this line item, which can be in the standard price book or a custom price book. A client application can use this information to show whether the unit price (or sales price) of the line item differs from the price book entry list price."
|
||
},
|
||
"Name": {
|
||
"type": "string",
|
||
"properties": "Filter, Nillable, Sort",
|
||
"description": "The opportunity line item name (known as “Opportunity Product” in the user interface). This read-only field is available in API version 30.0 and later."
|
||
},
|
||
"OpportunityId": {
|
||
"type": "reference",
|
||
"properties": "Create, Filter, Group, Sort",
|
||
"description": "ID of the associated Opportunity. This is a relationship field.",
|
||
"relationship_name": "Opportunity",
|
||
"relationship_type": "Lookup",
|
||
"refers_to": "Opportunity",
|
||
"required": true
|
||
},
|
||
"PricebookEntryId": {
|
||
"type": "reference",
|
||
"properties": "Create, Filter, Group, Nillable, Sort",
|
||
"description": "ID of the associated PricebookEntry. Exists only for those organizations that have Products enabled as a feature. In API versions 1.0 and 2.0, you can specify values for either this field or ProductId, but not both. For this reason, both fields are declared nillable. In API version 3.0 and later, you must specify values for this field instead of ProductId. This is a relationship field.",
|
||
"relationship_name": "PricebookEntry",
|
||
"relationship_type": "Lookup",
|
||
"refers_to": "PricebookEntry",
|
||
"required": true
|
||
},
|
||
"ProductId": {
|
||
"type": "reference",
|
||
"properties": "Create, Filter, Nillable",
|
||
"description": "ID of the related Product record. This field is unavailable as of version 3.0 and is only provided for backward compatibility. The Product object is unavailable beginning with version 8.0. Use the PricebookEntryId field instead, specifying the ID of the PricebookEntry record. This is a relationship field.",
|
||
"relationship_name": "Product2",
|
||
"relationship_type": "Lookup",
|
||
"refers_to": "Product2"
|
||
},
|
||
"Product2Id": {
|
||
"type": "reference",
|
||
"properties": "Create, Filter, Group, Nillable, Sort",
|
||
"description": "The ID of the related Product2 record. This is a read-only field available in API version 30.0 and later.Use the PricebookEntryId field instead, specifying the ID of the PricebookEntry record."
|
||
},
|
||
"ProductCode": {
|
||
"type": "string",
|
||
"properties": "Filter, Group, Nillable, Sort",
|
||
"description": "This read-only field is available in API version 30.0 and later. It references the value in the ProductCode field of the related Product2 record."
|
||
},
|
||
"Quantity": {
|
||
"type": "double",
|
||
"properties": "Create, Filter, Sort, Update",
|
||
"description": "Read-only if this record has a quantity schedule, a revenue schedule, or both a quantity and a revenue schedule.When updating these records: If you specify Quantity without specifying the UnitPrice, the UnitPrice value is adjusted to accommodate the new Quantity value, and the TotalPrice is held constant. If you specify both Discount and Quantity, you must also specify either TotalPrice or UnitPrice so the system can determine which one to automatically adjust."
|
||
},
|
||
"RecalculateTotalPrice": {
|
||
"type": "boolean",
|
||
"properties": "Defaulted on create, Filter, Group, Sort",
|
||
"description": "Changes behavior of OpportunityLineItem calculations when a line item has child schedule rows for the Quantity value. When enabled, if the rollup quantity changes, then the quantity rollup value is multiplied against the sales price to change the total price. Product2 flag must be set to true."
|
||
},
|
||
"ServiceDate": {
|
||
"type": "date",
|
||
"properties": "Create, Filter, Group, Nillable, Sort, Update",
|
||
"description": "Date when the product revenue will be recognized and the product quantity will be shipped. Opportunity Close Date—ServiceDate is ignored. Product Date—ServiceDate is used if not null. Schedule Date—ServiceDate is used if not null and there are no revenue schedules present for this line item, that is, there are no OpportunityLineItemSchedule records with a field Type value of Revenue that are children of this record."
|
||
},
|
||
"SortOrder": {
|
||
"type": "int",
|
||
"properties": "Create, Filter, Group, Nillable, Sort, Update",
|
||
"description": "Number indicating the sort order selected by the user. Client applications can use this to match the sort order in Salesforce."
|
||
},
|
||
"Subtotal": {
|
||
"type": "currency",
|
||
"properties": "Filter, Nillable, Sort",
|
||
"description": "Difference between standard and discounted pricing. Converted currency amounts when the opportunity's currency is different from the user's currency."
|
||
},
|
||
"TotalPrice": {
|
||
"type": "currency",
|
||
"properties": "Create, Defaulted on create, Filter, Nillable, Sort, Update",
|
||
"description": "This field is available only for backward compatibility. It represents the total price of the OpportunityLineItem.If you don’t specify UnitPrice, this field is required. If you specify Discount and Quantity, this field or UnitPrice is required. When updating these records, you can change either this value or the UnitPrice, but not both at the same time. This field is nillable, but you can’t set both TotalPrice and UnitPrice to null in the same update request. To insert the TotalPrice via the API (given only a unit price and the quantity), calculate this field as the unit price multiplied by the quantity. This field is read-only if the opportunity line item has a revenue schedule. If the opportunity line item doesn’t have a schedule or only has a quantity schedule, this field can be updated."
|
||
},
|
||
"UnitPrice": {
|
||
"type": "currency",
|
||
"properties": "Create, Defaulted on create, Filter, Nillable, Sort, Update",
|
||
"description": "The unit price for the opportunity line item. In the Salesforce user interface, this field’s value is calculated by dividing the total price of the opportunity line item by the quantity listed for that line item. Label is Sales Price.This field or TotalPrice is required. You can’t specify both. If you specify Discount and Quantity, this field or TotalPrice is required."
|
||
}
|
||
},
|
||
"special_access_rules": "The user must have the “Edit” permission on Opportunity records to create or update opportunity line items on an opportunity.",
|
||
"usage": "An Opportunity can have associated OpportunityLineItem records only if the Opportunity has a Pricebook2. An OpportunityLineItem must correspond to a Product2 that is listed in the opportunity's Pricebook2. For information about inserting OpportunityLineItem for an opportunity that doesn’t have an associated Pricebook2 or any existing line items, see Effects on Opportunities. This object is defined only for orgs with products enabled as a feature. If the products feature isn’t enabled, this object doesn’t appear in the describeGlobal() call, and you can’t use describeSObjects() or query the OpportunityLineItem object. For a visual diagram of the relationships between OpportunityLineItem and other objects, see the Product & Price Book diagram.\n\nAn Opportunity can have associated OpportunityLineItem records only if the Opportunity has a Pricebook2. An OpportunityLineItem must correspond to a Product2 that is listed in the opportunity's Pricebook2. For information about inserting OpportunityLineItem for an opportunity that doesn’t have an associated Pricebook2 or any existing line items, see Effects on Opportunities.\n\nThis object is defined only for orgs with products enabled as a feature. If the products feature isn’t enabled, this object doesn’t appear in the describeGlobal() call, and you can’t use describeSObjects() or query the OpportunityLineItem object.\n\nFor a visual diagram of the relationships between OpportunityLineItem and other objects, see the Product & Price Book diagram.",
|
||
"associated_objects": "This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version and later.\n\n- **OpportunityLineItemChangeEvent (API version 60.0)**: Change events are available for the object.",
|
||
"wsdl_segment": "```xml\n<simpleType name=\"ID\">\n <restriction base=\"xsd:string\">\n <length value=\"18\"/>\n <pattern value=\"[a-zA-Z0-9]{18}\"/>\n </restriction>\n</simpleType>\n<complexType name=\"OpportunityLineItem\">\n <complexContent>\n <extension base=\"ens:sObject\">\n <sequence>\n <element name=\"CreatedBy\" nillable=\"true\" minOccurs=\"0\" type=\"ens:User\"/>\n <element name=\"CreatedById\" nillable=\"true\" minOccurs=\"0\" type=\"tns:ID\"/>\n <element name=\"CreatedDate\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:dateTime\"/>\n <element name=\"Description\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:string\"/>\n <element name=\"IsDeleted\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <element name=\"LastModifiedBy\" nillable=\"true\" minOccurs=\"0\" type=\"ens:User\"/>\n <element name=\"LastModifiedById\" nillable=\"true\" minOccurs=\"0\" type=\"tns:ID\"/>\n <element name=\"LastModifiedDate\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:dateTime\"/>\n <element name=\"LastReferencedDate\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:dateTime\"/>\n <element name=\"LastViewedDate\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:dateTime\"/>\n <element name=\"ListPrice\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:double\"/>\n <element name=\"Name\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:string\"/>\n <element name=\"Opportunity\" nillable=\"true\" minOccurs=\"0\" type=\"ens:Opportunity\"/>\n <element name=\"OpportunityId\" nillable=\"true\" minOccurs=\"0\" type=\"tns:ID\"/>\n <element name=\"PricebookEntry\" nillable=\"true\" minOccurs=\"0\" type=\"ens:PricebookEntry\"/>\n <element name=\"PricebookEntryId\" nillable=\"true\" minOccurs=\"0\" type=\"tns:ID\"/>\n <element name=\"Product2\" nillable=\"true\" minOccurs=\"0\" type=\"ens:Product2\"/>\n <element name=\"Product2Id\" nillable=\"true\" minOccurs=\"0\" type=\"tns:ID\"/>\n <element name=\"ProductCode\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:string\"/>\n <element name=\"Quantity\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:double\"/>\n <element name=\"ServiceDate\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:date\"/>\n <element name=\"SortOrder\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:int\"/>\n <element name=\"SystemModstamp\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:dateTime\"/>\n <element name=\"TotalPrice\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:double\"/>\n <element name=\"UnitPrice\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:double\"/>\n <element name=\"UserRecordAccess\" nillable=\"true\" minOccurs=\"0\" type=\"ens:UserRecordAccess\"/>\n </sequence>\n </extension>\n </complexContent>\n</complexType>\n```",
|
||
"field_reference": {
|
||
"CanUseQuantitySchedule": {
|
||
"field_label": "Quantity Scheduling Enabled",
|
||
"type": "boolean"
|
||
},
|
||
"CanUseRevenueSchedule": {
|
||
"field_label": "Revenue Scheduling Enabled",
|
||
"type": "boolean"
|
||
},
|
||
"CreatedById": {
|
||
"field_label": "Created By ID",
|
||
"type": "reference",
|
||
"length": "18"
|
||
},
|
||
"CreatedDate": {
|
||
"field_label": "Created Date",
|
||
"type": "datetime"
|
||
},
|
||
"CurrencyIsoCode": {
|
||
"field_label": "Currency ISO Code",
|
||
"type": "picklist",
|
||
"length": "3"
|
||
},
|
||
"Description": {
|
||
"field_label": "Line Description",
|
||
"type": "string",
|
||
"length": "255"
|
||
},
|
||
"HasQuantitySchedule": {
|
||
"field_label": "Has Quantity Schedule",
|
||
"type": "boolean"
|
||
},
|
||
"HasRevenueSchedule": {
|
||
"field_label": "Has Revenue Schedule",
|
||
"type": "boolean"
|
||
},
|
||
"HasSchedule": {
|
||
"field_label": "Has Schedule",
|
||
"type": "boolean"
|
||
},
|
||
"Id": {
|
||
"field_label": "Line Item ID",
|
||
"type": "id",
|
||
"length": "18"
|
||
},
|
||
"IsDeleted": {
|
||
"field_label": "Deleted",
|
||
"type": "boolean"
|
||
},
|
||
"LastModifiedById": {
|
||
"field_label": "Last Modified By ID",
|
||
"type": "reference",
|
||
"length": "18"
|
||
},
|
||
"LastModifiedDate": {
|
||
"field_label": "Last Modified Date",
|
||
"type": "datetime"
|
||
},
|
||
"LastReferencedDate": {
|
||
"field_label": "Last Referenced Date",
|
||
"type": "datetime"
|
||
},
|
||
"LastViewedDate": {
|
||
"field_label": "Last Viewed Date",
|
||
"type": "datetime"
|
||
},
|
||
"ListPrice": {
|
||
"field_label": "List Price",
|
||
"type": "currency",
|
||
"precision": "18",
|
||
"scale": "2"
|
||
},
|
||
"Name": {
|
||
"field_label": "Opportunity Product Name",
|
||
"type": "string",
|
||
"length": "376"
|
||
},
|
||
"OpportunityId": {
|
||
"field_label": "Opportunity ID",
|
||
"type": "reference",
|
||
"length": "18"
|
||
},
|
||
"PricebookEntryId": {
|
||
"field_label": "Price Book Entry ID",
|
||
"type": "reference",
|
||
"length": "18"
|
||
},
|
||
"Product2Id": {
|
||
"field_label": "Product ID",
|
||
"type": "reference",
|
||
"length": "18"
|
||
},
|
||
"ProductCode": {
|
||
"field_label": "Product Code",
|
||
"type": "string",
|
||
"length": "255"
|
||
},
|
||
"Quantity": {
|
||
"field_label": "Quantity",
|
||
"type": "double",
|
||
"precision": "12",
|
||
"scale": "2"
|
||
},
|
||
"ServiceDate": {
|
||
"field_label": "Date",
|
||
"type": "date"
|
||
},
|
||
"SortOrder": {
|
||
"field_label": "Sort Order",
|
||
"type": "int",
|
||
"digits": "9"
|
||
},
|
||
"SystemModstamp": {
|
||
"field_label": "System Modstamp",
|
||
"type": "datetime"
|
||
},
|
||
"TotalPrice": {
|
||
"field_label": "Total Price",
|
||
"type": "currency",
|
||
"precision": "18",
|
||
"scale": "2"
|
||
},
|
||
"UnitPrice": {
|
||
"field_label": "Sales Price",
|
||
"type": "currency",
|
||
"precision": "18",
|
||
"scale": "2"
|
||
}
|
||
},
|
||
"field_reference_columns": [
|
||
"field_label",
|
||
"type",
|
||
"length",
|
||
"precision",
|
||
"scale",
|
||
"digits"
|
||
]
|
||
} |