Bookshelf Home | Contents | Index | Search | PDF |
Siebel eSales Administration Guide > Shopping Service API > Workflow Methods >
Reorder
Reorder is the reverse of CreateOrder. It creates a quote from an existing order.
Expected Preconditions Before the Method Can Be Called
- You cannot reorder Siebel eAuction or Siebel eTraining items. The Shopping Service skips those line items in the order.
- Because of this, if you are also using Siebel eTraining or Siebel eAuction, you must make sure that the eSales - Cancel Order Process and eSales - Modify Order Process workflows are not available for orders that contain Siebel eTraining or Siebel eAuction items. You should also disable the Cancel and Modify Order buttons in the My Orders view for orders that contain Siebel eTraining or Siebel eAuction items.
- Field maps are used to copy fields from the Order to Quote and Order Entry - Line Items to Quote Item business components, in the reverse of the CreateOrder method. Field maps are used to copy records from the Order Item XA to the Quote Item XA business component.
Example sample field maps are shown in Table 52. See the Shopping Service business service user properties in Siebel Tools for more details.
Arguments
The Reorder method has the arguments shown in Table 53.
Pseudo-Algorithm
- Get the Order Entry - Orders, Order Entry - Line Items, and Order Item XA business components. Get an instance of the Catalog business object and of the Quote, Quote Item, and Quote Item XA business components from this Catalog business object instance.
The Order Entry - Orders business component is already positioned on the correct record, as the Reorder method is row-sensitive.
- Create a record in the Quote business component. Use Quote|Order FieldMap n to copy fields from the Order Entry - Orders business component to Quote.
- For each record in the Order Entry - Line Items business component, copy it to the Quote Item business component using Quote Item|Order Item FieldMap n field maps. To maintain hierarchical relationships, copy the parent record before copying its child records. Also copy records from the grandchild business component Order Item XA to Quote Item XA.
NOTE: As Order Entry - Line Items and Quote Item have hierarchies, you cannot simply loop through the records in Order Entry - Line Items and copy them to Quote Item. You need to maintain the hierarchical relationship. To do this, you need to copy the parent record before you copy its child records.
In the Shopping Service implementation, records are first loaded from Order Entry - Line Items and a tree in the memory is generated. The tree is then traversed from the root, so the parent record is copied before the child records.- When doing step 3, for each record in the Order Entry - Line Items business component:
If the record is a Siebel eTraining item, confirm the registration record in the eTraining business component.
- Set the Error Message output argument if there is any error;
If Return Error Code = N, do not return an error;
Else return an error.
Bookshelf Home | Contents | Index | Search | PDF |
Siebel eSales Administration Guide Published: 18 April 2003 |