Adding an Item to a Promotion
When you use the Siebel REST API to add an optional component to a promotion, the Siebel application adds a specific product to an existing promotion either in a quote or in an order. This promotion could be the one you created in Applying a Promotion to a Quote or an Order, or, it could be an existing promotion that is being modified. This API is primarily used to add optional components, and throws an error message if the newly added item violates the maximum cardinality. An optional product can be either a promotion component, or an aggregate relationship specified using ProdPromRuleId.
The following request adds an optional item to a promotion:
-
URI: http://ServerName:port/siebel/v1.0/service/Workflow Process Manager/RunProcess
-
HTTP Method: POST
-
Content-Type: application/json
-
Authorization: Basic
-
Request body for order:
{ "body": { "ProcessName": "ISS Edit Promotion WS - Add Item Process", "ProdPromId": "88-1W9L6Y", "PricingMode": "Y", "EligibilityMode": "1", "ProdPromInstanceId": "88-1W9MMH", "ProdPromRuleId": "88-1W9L7B", "ProductId": "88-1W9L4O", "External Integration Id": "12345678", "Quantity": "1", "Target Document": "Quote", "Header Id": "88-1W9MM8" } }
For a description of the request message associated with this API, see the following table.
Name | Description |
---|---|
Process Name |
The following process is required:
|
ProdPromId |
Required. Promotion ID that is already applied to the quote or order. A new item is added to this promotion. |
PricingMode |
Optional. The default value is Y. If the value is set to Y, then the pricing is calculated for all the line items in the in-memory document. |
EligibilityMode |
Optional. Valid values are 0, 1, or 2. The default value is 2.
|
ProdPromInstanceId |
Required. Asset integration ID of the promotion. |
ProdPromRuleId |
Required. Product promotion rule ID. |
SiebelMessage |
Optional, depending on usage. However, this is required if HeaderId is not provided. PDS quote or PDS order. |
ProductId |
Required. Product ID that needs to be added to the promotion instance. |
External Integration Id |
Not used. |
Quantity |
Required. The default value is 1. Quantity of the product that needs to be added and associated with the promotion. |
Header Id |
Optional, depending on usage. However, this is required if SiebelMessage is not provided. Quote ID or order ID. |
Sync |
Optional. The default value is N. If set to Y, then an order or a quote is created or updated in the database. |
Target Document |
Required. The default value is Quote. Quote or Order. |
Here are the response details for a successful request:
-
HTTP Code: 200
-
Content-Type: application/json
-
Response body:
{ "Error Code": "", "Error Message": "", "SiebelMessage": { "IntObjectFormat": "Siebel Hierarchical", "MessageId": "", "IntObjectName": "PDS Order", "MessageType": "Integration Object", "Header": { "Account": "EPUI_Account", "Order Number": "EPUI_Modify_Order", "Order Type": "Sales Order", "Line Item": [ { "Name": "EPUI_CP1", "Product Id": "88-1W9L4O", "Line Item": { "Name": "EPUI_SP3" } } ] } } }