Product Schedules
商談商品の収益スケジュールと数量スケジュールを操作します。商談商品に対して複数の分割を使用して、商品スケジュールを確立または再確立します。スケジュール内のすべての分割を削除します。
このリソースは REST API バージョン 43.0 以降で使用できます。
API バージョン 46.0 以降では、設定済みおよび再設定済みスケジュールは、カスタム項目、入力規則、Apex トリガに対応しています。現在、すべてのスケジュールを削除すると、削除トリガも起動されます。
- URI
- /services/data/vXX.X/sobjects/OpportunityLineItem/OpportunityLineItemId/OpportunityLineItemSchedules
- 形式
- JSON、XML
- HTTP メソッド
- GET、PUT、DELETE
- 認証
- Authorization: Bearer token
- パラメータ
-
パラメータ 説明 type スケジュールの種別。OpportunityLineItemSchedules を確立する場合は必須です。有効な値には、Quantity、Revenue、Both があります。 quantity 数量スケジュール内で繰り返されるまたは分割される単位数の合計。0 以外の整数である必要があります。 quantityScheduleType 商品に数量スケジュールが指定されている場合、その種類。有効な値は、Divide または Repeat です。 quantityScheduleInstallmentPeriod 商品に数量スケジュールが指定されている場合、スケジュールでカバーされている時間。有効な値は、Daily、Weekly、Monthly、Quarterly、または Yearly です。 quantityScheduleInstallmentsNumber 商品に数量スケジュールが指定されている場合、分割の回数。1 ~ 150 の整数を指定できます。 quantityScheduleStartDate 数量スケジュールを開始する日付。形式は YYYY-MM-DD です。 revenue 繰り返されるまたは分割される収益の金額。 revenueScheduleType 商品に収益スケジュールが指定されている場合、その種類。有効な値は、Divide または Repeat です。 revenueScheduleInstallmentPeriod 商品に収益スケジュールが指定されている場合、スケジュールでカバーされている時間。有効な値は、Daily、Weekly、Monthly、Quarterly、または Yearly です。 revenueScheduleInstallmentsNumber 商品に収益スケジュールが指定されている場合、分割の回数。1 ~ 150 の整数を指定できます。 revenueScheduleStartDate 収益スケジュールを開始する日付。形式は YYYY-MM-DD です。
例
- 商談商品の数量スケジュールと収益スケジュールの両方を確立するか、収益スケジュールのみを確立するか、数量スケジュールのみを確立します。
-
1curl https://yourInstance.salesforce.com/services/data/v54.0/sobjects/OpportunityLineItem/00kR0000001WJJAIA4/OpportunityLineItemSchedules -H "Authorization: Bearer token" - JSON リクエストボディ
-
1{ 2"type": "Both", 3"quantity": 100, 4"quantityScheduleType": "Repeat", 5"quantityScheduleInstallmentPeriod": "Monthly", 6"quantityScheduleInstallmentsNumber": 12, 7"quantityScheduleStartDate": "2018-09-15", 8"revenue": 100, 9"revenueScheduleType": "Repeat", 10"revenueScheduleInstallmentPeriod": "Monthly", 11"revenueScheduleInstallmentsNumber": 12, 12"revenueScheduleStartDate": "2018-09-15" 13} 14 15{ 16"type": “Revenue”, 17"revenue": 100, 18"revenueScheduleType": “Divide”, 19"revenueScheduleInstallmentPeriod": “Quarterly”, 20"revenueScheduleInstallmentsNumber": 10, 21"revenueScheduleStartDate": "2018-09-15" 22} 23 24{ 25"type": “Quantity”, 26"quantity": 10, 27"quantityScheduleType": "Repeat", 28"quantityScheduleInstallmentPeriod": “Daily”, 29"quantityScheduleInstallmentsNumber": 150, 30"quantityScheduleStartDate": "2020-09-15", 31}