mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-08-07 00:02:34 +08:00
257 lines
17 KiB
JSON
257 lines
17 KiB
JSON
{
|
||
"sections": [
|
||
"title",
|
||
"description",
|
||
"fields",
|
||
"special_access_rules",
|
||
"usage",
|
||
"associated_objects",
|
||
"wsdl_segment",
|
||
"field_reference"
|
||
],
|
||
"title": "ProductConsumed - Data API",
|
||
"description": "Represents an item from your inventory that was used to complete a work order or work order line item in field service.",
|
||
"fields_columns": [
|
||
"type",
|
||
"properties",
|
||
"description"
|
||
],
|
||
"fields": {
|
||
"Description": {
|
||
"type": "textarea",
|
||
"properties": "Create, Nillable, Update",
|
||
"description": "Notes and context about the product consumed."
|
||
},
|
||
"IsConsumed": {
|
||
"type": "boolean",
|
||
"properties": "Create, Defaulted on create, Filter, Group, Sort, Update",
|
||
"description": "Indicates that a product consumed has been processed if the Product2 it refers to has IsSerialized=true selected. The default is false."
|
||
},
|
||
"IsLocked": {
|
||
"type": "boolean",
|
||
"properties": "Defaulted on create, Filter, Group, Sort",
|
||
"description": "Indicates whether the product consumed record is locked or not. The default value is false."
|
||
},
|
||
"IsProduct2Serialized": {
|
||
"type": "boolean",
|
||
"properties": "Create, Filter, Nillable, Sort, Update",
|
||
"description": "Indicates if a product is a serialized product. The default is false."
|
||
},
|
||
"LastReferencedDate": {
|
||
"type": "dateTime",
|
||
"properties": "Filter, Nillable, Sort",
|
||
"description": "The date when the product consumed was last modified. Its label in the user interface is Last Modified Date."
|
||
},
|
||
"LastViewedDate": {
|
||
"type": "dateTime",
|
||
"properties": "Filter, Nillable, Sort",
|
||
"description": "The date when the product consumed was last viewed."
|
||
},
|
||
"MayEdit": {
|
||
"type": "boolean",
|
||
"properties": "Defaulted on create, Filter, Group, Sort",
|
||
"description": "Indicates whether the product consumed record can be edited or not. The default value is false."
|
||
},
|
||
"PricebookEntryId": {
|
||
"type": "reference",
|
||
"properties": "Create, Filter, Group, Nillable, Sort, Update",
|
||
"description": "Price book associated with the product consumed. If the work order and the product item’s associated product are related to the same price book, the Price Book Entry auto-populates based on the product item."
|
||
},
|
||
"Product2Id": {
|
||
"type": "reference",
|
||
"properties": "Filter, Group, Nillable, Sort",
|
||
"description": "Product associated with the product consumed."
|
||
},
|
||
"ProductConsumedNumber": {
|
||
"type": "string",
|
||
"properties": "Autonumber, Defaulted on create, Filter, Sort",
|
||
"description": "(Read Only) Auto-generated number identifying the product consumed."
|
||
},
|
||
"ProductItemId": {
|
||
"type": "reference",
|
||
"properties": "Create, Filter, Group, Nillable, Sort",
|
||
"description": "Product item associated with the product consumed. Creating a product consumed record subtracts the quantity consumed from the linked product item’s quantity."
|
||
},
|
||
"ProductName": {
|
||
"type": "string",
|
||
"properties": "Filter, Group, Nillable, Sort",
|
||
"description": "Name for the product consumed."
|
||
},
|
||
"QuantityConsumed": {
|
||
"type": "double",
|
||
"properties": "Create, Filter, Sort, Update",
|
||
"description": "The quantity of products consumed."
|
||
},
|
||
"QuantityUnitOfMeasure": {
|
||
"type": "picklist",
|
||
"properties": "Filter, Group, Nillable, Sort",
|
||
"description": "Units of the consumed item; for example, kilograms or liters. Quantity Unit of Measure picklist values are inherited from the Quantity Unit of Measure field on products."
|
||
},
|
||
"TotalPrice": {
|
||
"type": "currency",
|
||
"properties": "Filter, Nillable, Sort",
|
||
"description": "The total price paid for the product items."
|
||
},
|
||
"UnitPrice": {
|
||
"type": "currency",
|
||
"properties": "Create, Filter, Nillable, Sort, Update",
|
||
"description": "The price per unit of the product consumed."
|
||
},
|
||
"WorkOrderId": {
|
||
"type": "reference",
|
||
"properties": "Create, Filter, Group, Sort",
|
||
"description": "Work order that the product was consumed for."
|
||
},
|
||
"WorkOrderLineItemId": {
|
||
"type": "reference",
|
||
"properties": "Create, Filter, Group, Nillable, Sort, Update",
|
||
"description": "Work order line item that the product was consumed for."
|
||
}
|
||
},
|
||
"special_access_rules": "Field Service must be enabled.\n\nTo create products consumed, you need Read permission on product items.\n\nTo delete or undelete product consumed for non-serialized products, you need Edit, Create,\n\t\t\t\tand Read permission on product consumed. For product consumed records that lookup to\n\t\t\t\tserialized products, you need Modify All Data or Modify All Records permission on\n\t\t\t\tproduct consumed.",
|
||
"usage": "When a product is consumed during the completion of a work order, create a product consumed record to track its consumption. You can add products consumed to work orders or work order line items. Track product consumption at the line item level if you want to know which products were used for each line item’s tasks. The way you use products consumed depends on how closely you want to track the state of your inventory in Salesforce. If you want to track the entire lifecycle of items in your inventory, including their storage, transfer, and consumption, link your products consumed records to product items. This approach ensures that your inventory numbers auto-update to reflect the consumption of products from your inventory. If you want to track product consumption only, however, specify a Price Book Entry on each product consumed record and leave the Product Item field blank.\n\nWhen a product is consumed during the completion of a work order, create a product consumed record to track its consumption. You can add products consumed to work orders or work order line items. Track product consumption at the line item level if you want to know which products were used for each line item’s tasks.\n\nThe way you use products consumed depends on how closely you want to track the state of your inventory in Salesforce. If you want to track the entire lifecycle of items in your inventory, including their storage, transfer, and consumption, link your products consumed records to product items. This approach ensures that your inventory numbers auto-update to reflect the consumption of products from your inventory. If you want to track product consumption only, however, specify a Price Book Entry on each product consumed record and leave the Product Item field blank.",
|
||
"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- **ProductConsumedChangeEvent (API version 48.0)**: Change events are available for the object.\n- **ProductConsumedFeed**: Feed tracking is available for the object.\n- **ProductConsumedHistory**: History is available for tracked fields of 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=\"ProductConsumed\">\n <complexContent>\n <extension base=\"ens:sObject\">\n <sequence>\n <element name=\"ActivityHistories\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\n <element name=\"ApprovalSubmissions\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\n <element name=\"ApprovalWorkItems\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\n <element name=\"AttachedContentDocuments\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\n <element name=\"Attachments\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\n <element name=\"CombinedAttachments\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\n <element name=\"ContentDocumentLinks\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\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=\"Discount\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:double\"/>\n <element name=\"Emails\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\n <element name=\"Events\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\n <element name=\"FeedSubscriptionsForEntity\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\n <element name=\"Feeds\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\n <element name=\"FlowOrchestrationWorkItems\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\n <element name=\"Histories\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\n <element name=\"IsConsumed\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <element name=\"IsDeleted\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <element name=\"IsProduct2Serialized\" 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=\"LookedUpFromActivities\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\n <element name=\"Notes\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\n <element name=\"NotesAndAttachments\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\n <element name=\"OpenActivities\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\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=\"ProcessInstances\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\n <element name=\"ProcessSteps\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\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=\"ProductConsumedNumber\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:string\"/>\n <element name=\"ProductConsumedStates\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\n <element name=\"ProductItem\" nillable=\"true\" minOccurs=\"0\" type=\"ens:ProductItem\"/>\n <element name=\"ProductItemId\" nillable=\"true\" minOccurs=\"0\" type=\"tns:ID\"/>\n <element name=\"ProductItemTransactions\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\n <element name=\"ProductName\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:string\"/>\n <element name=\"QuantityConsumed\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:double\"/>\n <element name=\"QuantityUnitOfMeasure\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:string\"/>\n <element name=\"RecordActionHistories\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\n <element name=\"RecordActions\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\n <element name=\"SerializedProductTransactions\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\n <element name=\"Subtotal\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:double\"/>\n <element name=\"SystemModstamp\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:dateTime\"/>\n <element name=\"Tasks\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\n <element name=\"TopicAssignments\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\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 <element name=\"WorkOrder\" nillable=\"true\" minOccurs=\"0\" type=\"ens:WorkOrder\"/>\n <element name=\"WorkOrderId\" nillable=\"true\" minOccurs=\"0\" type=\"tns:ID\"/>\n <element name=\"WorkOrderLineItem\" nillable=\"true\" minOccurs=\"0\" type=\"ens:WorkOrderLineItem\"/>\n <element name=\"WorkOrderLineItemId\" nillable=\"true\" minOccurs=\"0\" type=\"tns:ID\"/>\n </sequence>\n </extension>\n </complexContent>\n</complexType>\n<simpleType name=\"QueryLocator\">\n <restriction base=\"xsd:string\"/>\n</simpleType>\n<complexType name=\"QueryResult\">\n <sequence>\n <element name=\"done\" type=\"xsd:boolean\"/>\n <element name=\"queryLocator\" type=\"tns:QueryLocator\" nillable=\"true\"/>\n <element name=\"records\" type=\"ens:sObject\" nillable=\"true\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n <element name=\"size\" type=\"xsd:int\"/>\n </sequence>\n</complexType>\n```",
|
||
"field_reference": {
|
||
"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": "Description",
|
||
"type": "textarea",
|
||
"length": "32000"
|
||
},
|
||
"Discount": {
|
||
"field_label": "Discount",
|
||
"type": "percent",
|
||
"precision": "5",
|
||
"scale": "2"
|
||
},
|
||
"Id": {
|
||
"field_label": "Product Consumed ID",
|
||
"type": "id",
|
||
"length": "18"
|
||
},
|
||
"IsConsumed": {
|
||
"field_label": "Consumed",
|
||
"type": "boolean"
|
||
},
|
||
"IsDeleted": {
|
||
"field_label": "Deleted",
|
||
"type": "boolean"
|
||
},
|
||
"IsProduct2Serialized": {
|
||
"field_label": "Serialized",
|
||
"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"
|
||
},
|
||
"PricebookEntryId": {
|
||
"field_label": "Price Book Entry ID",
|
||
"type": "reference",
|
||
"length": "18"
|
||
},
|
||
"Product2Id": {
|
||
"field_label": "Product ID",
|
||
"type": "reference",
|
||
"length": "18"
|
||
},
|
||
"ProductConsumedNumber": {
|
||
"field_label": "Product Consumed Number",
|
||
"type": "string",
|
||
"length": "255"
|
||
},
|
||
"ProductItemId": {
|
||
"field_label": "Product Item ID",
|
||
"type": "reference",
|
||
"length": "18"
|
||
},
|
||
"ProductName": {
|
||
"field_label": "Product Name",
|
||
"type": "string",
|
||
"length": "255"
|
||
},
|
||
"QuantityConsumed": {
|
||
"field_label": "Quantity Consumed",
|
||
"type": "double",
|
||
"precision": "18",
|
||
"scale": "2"
|
||
},
|
||
"QuantityUnitOfMeasure": {
|
||
"field_label": "Quantity Unit Of Measure",
|
||
"type": "picklist",
|
||
"length": "40"
|
||
},
|
||
"Subtotal": {
|
||
"field_label": "Subtotal",
|
||
"type": "currency",
|
||
"precision": "18",
|
||
"scale": "2"
|
||
},
|
||
"SystemModstamp": {
|
||
"field_label": "System Modstamp",
|
||
"type": "datetime"
|
||
},
|
||
"TotalPrice": {
|
||
"field_label": "Total Price",
|
||
"type": "currency",
|
||
"precision": "18",
|
||
"scale": "2"
|
||
},
|
||
"UnitPrice": {
|
||
"field_label": "Unit Price",
|
||
"type": "currency",
|
||
"precision": "18",
|
||
"scale": "2"
|
||
},
|
||
"WorkOrderId": {
|
||
"field_label": "Work Order ID",
|
||
"type": "reference",
|
||
"length": "18"
|
||
},
|
||
"WorkOrderLineItemId": {
|
||
"field_label": "Work Order Line Item ID",
|
||
"type": "reference",
|
||
"length": "18"
|
||
}
|
||
},
|
||
"field_reference_columns": [
|
||
"field_label",
|
||
"type",
|
||
"length",
|
||
"precision",
|
||
"scale"
|
||
]
|
||
} |