Siebel Business Process Framework: Workflow Guide > Using Predefined Workflow Policies > Using Predefined Workflow Policy Programs >

Using a Workflow Policy Program to Send a Quote Through a Pager


The example in this topic uses a predefined workflow policy program to send a quote depending on the relationship that exists between the value for the quote and the revenue value of the opportunity that the quote references. If a quote contains a value that is less than some percentage of the revenue for the opportunity, then Siebel CRM considers it as heavily discounted, and then sends a page to a designated employee.

SQL Usage with This Example

This workflow policy program sends a page. The SQL statements include one default RDBMS and three that are specific to one of the following RDBMSs: Informix, Oracle, or SQL Anywhere.

NOTE:  For Siebel Innovation Pack 2015, the local database for the Siebel Mobile Web Client uses SAP SQL Anywhere. SAP SQL Anywhere is not available for new deployments after September 2015. For more detailed information on how this change affects Siebel Tools and Siebel Remote, see Siebel Release Notes on My Oracle Support for Innovation Pack 2015 (Doc ID 1996273.1).

The asterisk and equal sign (*=) specify an outer join. The default SQL statement uses this join to get five values from four tables:

select
q.QUOTE_NUM, q.REV_NUM, o.NAME, a.NAME, a.LOC
from
&Table_Owner.S_DOC_QUOTE q, &Table_Owner.S_ORG_EXT a, &Table_Owner.S_OPTY o
where
q.ROW_ID = ? and q.OPTY_ID *= o.ROW_ID and q.TARGET_OU_ID *= a.ROW_ID

The plus sign (+) in the following code specifies an outer join. The SQL statement uses this join to get five values from four tables:

select
q.QUOTE_NUM, q.REV_NUM, o.NAME, a.NAME, a.LOC
from
&Table_Owner.S_DOC_QUOTE q, &Table_Owner.S_ORG_EXT a, &Table_Owner.S_OPTY o
where
q.ROW_ID = ? and q.OPTY_ID = o.ROW_ID (+) and q.TARGET_OU_ID = a.ROW_ID (+)

The SQL statement is required. If an SQL statement that uses the following format occurs, then this format takes precedence:

<SQL>

Output from the SQL statement defines the following variables. These variables contain the result of the query statement. If the table that the outer join uses does not exist, then these variables contain null:

  • Quote Number
  • Revision
  • Opportunity
  • Account
  • Site
Siebel Business Process Framework: Workflow Guide Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Legal Notices.