Invoking Siebel Assignment Manager
You can invoke Siebel Assignment Manager from SmartScripts using Siebel eScript or Siebel VB. How you invoke Assignment Manager depends on the mode in which Assignment Manager is operating. If Assignment Manager is executing in interactive mode, you require a user (for example, a service representative) to perform some action (for example, assign a record to an employee) to advance the script.
If Assignment Manager is executing in dynamic mode, you can invoke it from a SmartScript by triggering certain events. A user is not required to invoke the Assignment Manager from the SmartScript.
The following example procedure demonstrates how to invoke Assignment Manager executing in dynamic mode on a newly created service request record.
To invoke Assignment Manager
Create assignment rules for the service request object.
For more information about assignment rules configuration, see Siebel Assignment Manager Administration Guide.
Create a SmartScript with values similar to those in the following table.
Element Attribute Value Question1
Name
SRDescription
Answer Type
String
Answer Control
Default
Save Business Object
Service Request
Save Business Component
Service Request
Save Field
Description
Translations
English-American
Question 2
Name
TestQuestion2
Answer Type
RDsr2
Answer Control
RDsr2
Translations
English-American
Page
Name
TestPage1
First Question
SRDescription
Translation
English-American
Label
TestPage1
Next Question
TestQuestion2
SmartScript
Name
SmartScript_AssignSR
Type
Pick any value (Other)
Active
Yes
First Page
TestPage1
Translation
English-American
Label
SmartScript Assign SR
Navigate to Administration - SmartScripts screen > Scripts view > Programs subview.
In the Programs list, select Script_Finish, and add the following code:
Note: When assigning an object, it must exist in order to match the assignment rules, criteria, and so on. To make sure that a newly created record exists in the database, users can run the following event:BusinessComponent.WriteRecord()
before calling an Assignment Manager method in the SmartScript event.function Script_Finish() { var sFirstQuestion = StartQuestion(); var SaveBC = sFirstQuestion.GetSaveBusComp(); TheApplication().Trace(" \n the value of sFirstQuestion = "+sFirstQuestion); SaveBC.ActivateField("Area"); SaveBC.SetFieldValue("Area", "Upgrade"); //***************** var myid = SaveBC.GetFieldValue("Id"); SaveBC.WriteRecord(); var bsAmgr = TheApplication().GetService("Synchronous Assignment Manager Requests"); var psInput = TheApplication().NewPropertySet(); var psOutput= TheApplication().NewPropertySet(); psInput.SetProperty("AsgnObjName","Service Request"); //Assignment Object Name psInput.SetProperty("ObjRowId", myid); //Object Row ID bsAmgr.InvokeMethod("Assign", psInput, psOutput); //***************** }