Sales Agreement (POST)

Create a sales agreement from an external source, including quote, opportunity, or custom object.

Resource 

1/services/data/vXX.X/connect/manufacturing/sales-agreements

Available Version 

51.0

Requires Chatter 

No

HTTP Methods 

POST

Special Access Rules 

To use this resource, your Salesforce org must have the Manufacturing Cloud license with the Sales Agreements permission set.

Prerequisite 

Before you use the resource, use the new ConvertToSalesAgreement mapping usage type available in ObjectHierarchyRelationship settings to map an input object (quote or opportunity) to an output object (sales agreement) and define field mappings. All the products from the source object child entity will be added to the sales agreement. For example, see the ObjectHierarchyRelationship metadata type for the mapping definition from Opportunity to SalesAgreement (parent level mapping) and OpportunityLineItem to SalesAgreementProduct (child level mapping). To use decimal values, map the quantity values to InitialPlannedQtyValue.

See Also

Request Body for POST 

JSON Example 

1{
2  "sourceObjectId": "0kFT1000000000RMAQ",
3  "salesAgreementDefaultValues": {
4      "salesAgreement": {
5          "StartDate": "2020-01-01",
6          "ScheduleFrequency": "Monthly",
7          "ScheduleCount": "10"
8      },
9      "salesAgreementProduct": {
10          "PricebookEntry": "01uxx00000091jOAAQ",
11          "Name": "test-sap1",
12          "InitialPlannedQuantity":"1"
13      }
14  }
15}

Properties 

NameTypeDescriptionRequired or OptionalAvailable Version
salesAgreement​​​DefaultValuesSales Agreement Default​​ Fields Input[]Default field values for the SalesAgreement and SalesAgreementProduct entities that aren’t defined in the mapping definition.
Note: You can remove a mapping field from the definition by providing the output field value as blank for SalesAgreement or SalesAgreementProduct.
Optional51.0
sourceObjectIdStringID of the source object containing the mapping definition used to create the sales agreement record.Required51.0

Response Body for POST 

Sales Agreement Output