この文章は Salesforce 機械翻訳システムを使用して翻訳されました。詳細はこちらをご参照ください。
英語に切り替える

ForecastingSourceDefinition

売上予測で売上を予測するために使用されるオブジェクト、基準、日付種別、階層を表します。このオブジェクトは、API バージョン 52.0 以降で使用できます。

このトピックの情報は、Summer ’21 以降に作成される売上予測種別にのみ適用されます。

メモ

サポートされているコール

create()delete()describeSObjects()query()retrieve()update()upsert()

項目

項目 詳細
CategoryField
picklist
プロパティ
Create、Filter、Group、Nillable、Restricted picklist、Sort
説明
売上予測種別に関連付けられている売上予測分類の名前。
可能な値は次のとおりです。
  • Opportunity.ForecastCategoryName
DateField
picklist
プロパティ
Create、Filter、Group、Nillable、Restricted picklist、Sort
説明
売上予測種別の日付種別に使用される項目。たとえば、商談の CloseDate 項目は、商談の完了予定日ベースの売上予測種別に使用されます。
可能な値は次のとおりです。
  • Opportunity.CloseDate
  • OpportunityLineItem.ServiceDate
  • OpportunityLineItemSchedule.ScheduleDate
DeveloperName
string
プロパティ
Create、Filter、Group、Sort、Update
説明
売上予測ソース定義の API 参照名。

「DeveloperName を表示」または「設定・定義を参照する」権限を持っているユーザーのみがこの項目の表示、グループ化、並べ替え、絞り込みを行えます。

メモ

FamilyField
picklist
プロパティ
Create、Filter、Group、Nillable、Restricted picklist、Sort
説明
この項目は、売上予測を商品ファミリー別にグループ化する場合に使用します。可能な値は次のとおりです。
  • Product2.Family
Language
picklist
プロパティ
Create、Defaulted on create、Filter、Group、Nillable、Restricted picklist、Sort、Update
説明
売上予測ソース定義の言語。例: English。
MasterLabel
string
プロパティ
Create、Filter、Group、Sort、Update
説明
必須。この売上予測ソース定義の表示パネルを制御します。
MeasureField
picklist
プロパティ
Create、Filter、Group、Nillable、Restricted picklist、Sort
説明
売上予測種別の基準に使用される項目。たとえば、商談の Amount 項目は、収益ベースの売上予測種別に関連付けられています。
可能な値は次のとおりです。*
  • Opportunity.Amount
  • Opportunity.Custom
  • Opportunity.TotalOpportunityQuantity
  • OpportunityLineItem.Custom
  • OpportunityLineItem.Quantity
  • OpportunityLineItem.TotalPrice
  • OpportunityLineItemSchedule.Custom
  • OpportunityLineItemSchedule.Quantity
  • OpportunityLineItemSchedule.Revenue
  • OpportunitySplit.Custom
  • OpportunitySplit.SplitAmount
*Custom は、売上予測種別の基準のベースになるカスタム項目の名前を表します。例: エネルギー消費量を予測するには、Megawatts__c を使用します。
SourceObject
picklist
プロパティ
Create、Filter、Group、Restricted picklist、Sort
説明
この売上予測ソース定義に関連付けられているオブジェクト。
可能な値は次のとおりです。
  • Opportunity
  • OpportunityLineItem
  • OpportunityLineItemSchedule
  • OpportunitySplit
  • Product2
Territory2Field
picklist
プロパティ
Create、Filter、Group、Nillable、Restricted picklist、Sort
説明
テリトリーベースの売上予測種別の場合、テリトリー情報に使用される項目を示します。
可能な値は次のとおりです。
  • Opportunity.Territory2Id
ユーザーロールベースの売上予測種別の場合、この値は null です。
UserField
picklist
プロパティ
Create、Filter、Group、Nillable、Restricted picklist、Sort
説明
売上予測の所有者を指定します。
可能な値は次のとおりです。
  • Opportunity.OwnerId
  • OpportunitySplit.SplitOwnerId

使用方法

ForecastingSourceDefinition は、売上予測種別の構造を定義する場合に使用します。売上予測ソース定義は、ForecastingTypeSource を介して ForecastingType に結合されます。

この例の場合、カスタム金額売上予測と呼ばれるユーザーロールベースの売上予測種別は、商談の Amount および Close Date 項目に基づきます。

1ForecastingType type = new  sforce.SObject("ForecastingType");
2type.DeveloperName = "Custom_Amount_Forecast";
3type.MasterLabel = "Custom Amount Forecast";
4type.IsAmount = true;
5type.IsQuantity = false;
6type.RoleType = "R";
7type.DateType = "OpportunityCloseDate";
8String typeId = insert(type);
9
10ForecastingSourceDefinition sourceDefinition = new sforce.SObject("ForecastingSourceDefinition")
11sourceDefinition.DeveloperName = "Custom Amount Source";
12sourceDefinition.MasterLabel = "Custom_Amount_Source";
13sourceDefinition.SourceObject = "Opportunity";
14sourceDefinition.MeasureField = "Opportunity.Amount";
15sourceDefinition.DateField = "Opportunity.CloseDate";
16sourceDefinition.UserField = "Opportunity.OwnerId";
17sourceDefinition.CategoryField = "Opportunity.ForecastCategoryName";
18String sourceDefinitionId = insert(sourceDefinition);
19
20ForecastingTypeSource typeSource = new sforce.SObject("ForecastingTypeSource");
21typeSource.MasterLabel = "Custom Amount Type Source";
22typeSource.DeveloperName = "Custom_Amount_Type_Source";
23typeSource.ForecastingTypeId = typeId;
24typeSource.ForecastingSourceDefinitionId = sourceDefinitionId;
25typeSource.SourceGroup = 1;
26insert(typeSource);