您位於此處:
InsQuoteService:getQuoteVersions
使用此服務可根據報價的「機會識別碼」以取得不同版本的報價,然後根據 Quote 欄位集 QuoteCompareHeader 傳回報價清單。
方法:getQuoteVersions
遠端選項
選項 |
描述 |
|---|---|
quoteId |
報價的識別碼,用於取用其他版本 |
activeQuotesOnly |
選擇性 預設為 false。若為 true,則會將其他條件新增至報價查詢,以僅提取目前啟用的報價 (例如,報價的「有效日期」與「結束日期」之間的目前日期)。 |
includeFieldInfo |
選擇性 預設為 true。如果為 true,則包含 UI 使用的報價欄位資訊。 |
輸出 JSON
請參閱下列輸出 JSON 範例。
{
"fieldInfo": {
"instest10__EndDate__c": {
"isUpdateable": true,
"isCreatable": true,
"isRequired": false,
"fieldType": "DATE",
"fieldLabel": "End Date",
"fieldName": "instest10__EndDate__c"
},
"instest10__EffectiveDate__c": {
"isUpdateable": true,
"isCreatable": true,
"isRequired": false,
"fieldType": "DATE",
"fieldLabel": "Effective Date",
"fieldName": "instest10__EffectiveDate__c"
},
"instest10__Type__c": {
"options": [
{
"Id": "New Business",
"Name": "New Business"
},
{
"Id": "Endorsement",
"Name": "Endorsement"
}
],
"isUpdateable": true,
"isCreatable": true,
"isRequired": false,
"fieldType": "PICKLIST",
"fieldLabel": "Type",
"fieldName": "instest10__Type__c"
},
"Name": {
"isUpdateable": true,
"isCreatable": true,
"isRequired": false,
"fieldType": "STRING",
"fieldLabel": "Quote Name",
"fieldName": "Name"
},
"Id": {
"isUpdateable": false,
"isCreatable": false,
"isRequired": false,
"fieldType": "ID",
"fieldLabel": "Quote ID",
"fieldName": "Id"
},
"Status": {
"options": [
{
"Id": "Draft",
"Name": "Draft"
},
{
"Id": "Needs Review",
"Name": "Needs Review"
},
{
"Id": "In Review",
"Name": "In Review"
},
{
"Id": "Approved",
"Name": "Approved"
},
{
"Id": "Rejected",
"Name": "Rejected"
},
{
"Id": "Presented",
"Name": "Presented"
},
{
"Id": "Accepted",
"Name": "Accepted"
},
{
"Id": "Denied",
"Name": "Denied"
},
{
"Id": "Issued",
"Name": "Issued"
}
],
"isUpdateable": true,
"isCreatable": true,
"isRequired": false,
"fieldType": "PICKLIST",
"fieldLabel": "Status",
"fieldName": "Status"
},
"CreatedDate": {
"isUpdateable": false,
"isCreatable": false,
"isRequired": false,
"fieldType": "DATETIME",
"fieldLabel": "Created Date",
"fieldName": "CreatedDate"
},
"instest10__RootItemTotal__c": {
"isUpdateable": false,
"isCreatable": false,
"isRequired": false,
"fieldType": "CURRENCY",
"fieldLabel": "Total Price",
"fieldName": "instest10__RootItemTotal__c"
}
},
"quotesToCompare": [
{
"attributes": {
"type": "Quote",
"url": "/services/data/v48.0/sobjects/Quote/0Q06g0000009yAWCAY"
},
"instest10__RootItemTotal__c": 2740,
"CreatedDate": "2020-04-01T20:35:57.000+0000",
"Status": "Draft",
"Id": "0Q06g0000009yAWCAY",
"Name": "Alan6 Auto Quote New Version",
"instest10__Type__c": "New Business",
"instest10__EffectiveDate__c": "2020-05-01",
"instest10__EndDate__c": "2021-04-30"
},
{
"attributes": {
"type": "Quote",
"url": "/services/data/v48.0/sobjects/Quote/0Q06g0000009yAHCAY"
},
"instest10__RootItemTotal__c": 1575,
"CreatedDate": "2020-04-01T18:53:26.000+0000",
"Status": "Issued",
"Id": "0Q06g0000009yAHCAY",
"Name": "Alan6 Auto Quote",
"instest10__Type__c": "New Business",
"instest10__EffectiveDate__c": "2020-04-01",
"instest10__EndDate__c": "2021-03-31"
}
],
"errorCode": "INVOKE-200",
"error": "OK"
}