Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
Siebel Partner Relationship Management Administration Guide > Setting Up Application Services Interfaces > ASI Workflows >
Opportunity Transfer Workflows
The workflow processes described in this section are associated with opportunity transfer.
They are used for the following functions:
- Transferring an Opportunity
- Updating an Opportunity
- Requesting an Opportunity Update
Either the brand owner or the partner can transfer an opportunity, update the opportunity or request an update. The descriptions below refer to the two systems involved as "System A" and "System B." These can refer to either the brand owner or the partner's system, depending on who ran the opportunity transfer, updated the opportunity or requested an update.
Workflows to Transfer an Opportunity
As an illustration of opportunity transfer, we will assume the brand owner clicks the Transfer button to transfer the opportunity to a partner. The following workflows are invoked in the following order:
- Opportunity Sharing Pick Partner. When the brand owner or partner clicks the Transfer button on the Transfer Opportunity Child Applet, it calls the Opportunity Sharing Pick Partner workflow. This workflow retrieves the partner id of the partner and passes it on to the Opportunity Sharing External Create workflow, which Opportunity Sharing Pick Partner workflow calls as a subprocess.
- Opportunity Sharing External Create. This workflow captures the object id of the opportunity that is being transferred. It changes the opportunity's transfer status to Transfer In Progress. Then it creates an internal key that System A will use to reference the opportunity, and it passes the opportunity id, opportunity key, and the partner id to the workflow Build Siebel Message, which it calls as a subprocess.
- Opportunity Sharing Build Siebel Message. This workflow uses the opportunity id to gather all the necessary information on the opportunity and put it into a Siebel message. Opportunity Sharing Build Siebel Message also collects the Partner information and System A's Organizational information, and it adds that to the Siebel message. This Siebel message is passed back to Opportunity Sharing External Create which transfers it to system B and waits for a response.
- Opportunity Sharing Siebel Create. System B receives the Siebel message and runs the Opportunity Sharing Siebel Create workflow. Opportunity Sharing Siebel Create first inserts the opportunity's account by calling PRM ANI Inbound Create Account. It then inserts the Opportunity's information. If this is successful, it creates a key that System B will use to reference the opportunity, updates the Transfer Status on system B to Transfer Successful, and stores System A's key. It then adds System B's key and the current transfer status to the Siebel message. This message is sent back to System A.
- Opportunity Sharing Receive Create Response. Once System A receives the response, it calls the Opportunity Sharing Receive Create Response. This workflow updates the status of the transfer based on the response. It also stores System B's key.
Workflows to Update an Opportunity
After an opportunity has been transferred, the brand owner or partner can click the Update Opportunity button to update the transferred opportunity in the other company's system with new information that they have entered in their system. When the brand owner or partner does this, the following workflows are invoked in the following order:
- Opportunity Sharing External Update. This workflow is called when the brand owner clicks the Update button on the Transfer Opportunity Child Applet. Opportunity Sharing External Update calls Opportunity Sharing Set Update Status.
- Opportunity Sharing Set Update Status. This workflow first calls Opportunity Sharing Inbound or Outbound.
- Opportunity Sharing Inbound or Outbound. This workflow figures out whether this opportunity was originally sent to System B from System A or was originally sent to System A by System B. Was this opportunity originally an outbound opportunity or an inbound opportunity? It also retrieves System B's key and the partner id of who the opportunity was sent to. It passes this information back to Opportunity Sharing Set Update Status. Opportunity Sharing Set Update Status updates the Transfer Status to Update Pending. Then it calls Opportunity Sharing Build Siebel Message passing the opportunity id, system A and system B's keys, and the partner id. (Depending on your setup, this workflow might not be necessary. A call to this workflow can be replaced with a Siebel operation that queries the ANI Keymap business component.)
- Opportunity Sharing Create Siebel Message. This workflow creates a Siebel message and passes it back to Set Update Status. Then set Update Status passes the Siebel message back up to External Update. External Update transfers the Siebel message to System B.
- Opportunity Sharing Siebel Update. System B receives the Siebel message and runs Opportunity Sharing Siebel Update. Opportunity Sharing Siebel Update checks to see if it needs to insert the opportunity's account again, by calling PRM ANI Inbound Create Account. Then it updates the Opportunity's information. If this is successful, it updates the Transfer Status on system B to Update Successful. Then it then adds the current transfer status to the Siebel message, and it sends this message is sent back to System A.
- Opportunity Sharing Receive Update Response. Once System A receives the response, it calls the Opportunity Sharing Receive Update Response workflow, which updates the status of the transfer based on the response.
Workflows to Receive an Update of Opportunity
After an opportunity has been transferred, the brand owner or partner can click the Receive Update button to the query the other company's system for new information that has been entered about the opportunity, and to update the opportunity in its own system with this new information. When the brand owner or partner does this, the following workflows are invoked in the following order:
- Opportunity Sharing External Query. When the brand owner calls the Receive Update button on the Transfer Opportunity Child Applet, it calls the Opportunity Sharing External Query workflow. External Query first uses the Opportunity Sharing Inbound or Outbound workflow to determine whether this was originally an inbound or an outbound opportunity, as described earlier. Then Opportunity Sharing External Query takes that information and creates a Siebel message with System A's and System B's keys. It then transfers this Siebel message to system B.
- Opportunity Sharing Siebel Query. When System B receives the Siebel message, it runs the Opportunity Sharing Siebel Query workflow. Opportunity Sharing Siebel Query makes sure the opportunity exists and then calls Opportunity Sharing Set Update Status.
- Opportunity Sharing Set Update Status. This workflow first calls the Opportunity Inbound or Outbound workflow, which does the following: determines whether this was originally an outbound opportunity or an inbound opportunity, as described earlier, retrieves System A's key and the partner id of the employee the opportunity was sent to, and passes this information back to Opportunity Sharing Set Update Status. Then Opportunity Sharing Set Update Status updates the Transfer Status to Update Pending. Then it calls the Opportunity Sharing Build Siebel Message workflow, to create a message containing the opportunity id, system B and system A's keys, and the partner id. After the Siebel message is passed back to Opportunity Sharing Set Update Status, Opportunity Sharing Set Update Status passes the Siebel message back up to Opportunity Sharing External Update. Opportunity Sharing External Update transfers the Siebel message to System A.
- Opportunity Sharing Siebel Update. Once System A receives the response, it calls Opportunity Sharing Siebel Update. This workflow returns a Siebel message, which Opportunity Sharing External Query transfers back to System B.
- Opportunity Sharing Receive Update Response. System B receives the Siebel message and calls Receive Update Response, which will update the status of the transfer based on the response.
Update of the Status Field by These Workflows
The final step of all of these opportunity transfer processes updates the status field to tell the user whether the transfer, send update, or receive update process was successful. The Transfer Status field can have the following values:
- Blank. The opportunity has never been transferred to a partner. In this case, only the Transfer button is active. An update cannot be sent or received until after the opportunity has been transferred.
- Transfer Pending. The opportunity has been transferred to a partner, but the acknowledgement from the partner has not been received yet. In this case, none of the transfer buttons is active.
- Transfer Successful. The opportunity has been transferred to a partner, and the acknowledgement indicates that the transfer went through. In this case, only send update and receive update are active. Once an opportunity has been transferred successfully, it cannot be transferred again.
- Transfer Unsuccessful. The opportunity has been transferred to a partner, and the acknowledgement indicates that the transfer did not go through. This may be because the connection timed out, the opportunity already exists on the other system, the source organization is not listed as a partner in the other system, or there was an exception with the insert step. In this case, the transfer button is the only button that is active. The user can try again to transfer the opportunity, either to the same partner or a different one.
- Update Pending. The send update or receive update process is underway, but no response has yet been received. In this case, none of the buttons is active.
- Update Successful. The send update or receive update process completed successfully. In this case, the send update and receive update buttons are active.
- Update Unsuccessful. The send update or receive updated process failed, based on the return message from the partner's system. This may be because the connection timed out, the opportunity does not exist on the other system, or there was an exception with the update step. In this case, the send update and receive update buttons are active.
Opportunity Sharing Build Siebel Message
The Opportunity Sharing Build Siebel Message workflow process is shown in Figure 3.
When this workflow is called, the following events happen:
- Create Message Header. Creates an empty message header that will be added to the Siebel message. This header will eventually contain the transfer information.
- Store Message Header/Append Message. Creates an empty Siebel message using the ANI Opportunity Message (PRM ANI) format and appends the message header to it.
- Query Oppty. Queries the database for the opportunity matching the object id. Also returns the account id for the account of this opportunity.
- Store Oppty & Append Oppty. Adds the opportunity to the Siebel message.
- Oppty Has An Account. Checks to see if the account id is null. If it is, the workflow does not need to query for an account.
- Create Account Message. If there is no account for this opportunity, creates an empty account property set to follow the ANI Opportunity Message (PRM ANI) format for the Siebel message.
- Query Account. If there is an account for this opportunity, returns the account information.
- Store Oppty Account/Append Account. Adds the account information to the Siebel message.
- Query Partner/Store Partner/Append Partner. Queries for the partner the opportunity is being sent to and appends that information to the Siebel message.
- Query Source Org/Store Source Org/Append Source Org. Queries for the source organization and appends that information to the Siebel message.
- Get Organization DUNS/Set Organization DUNS. Retrieves the source organization's DUNS number and adds it to the Siebel message.
- Add Internal Key. Adds the internal key to the Siebel message.
- Add Internal Key Description. Adds the internal key description to the Siebel message.
- Add External Key. Adds the external key to the Siebel message.
- Add External Key Description. Adds the external key description to the Siebel message.
- Add Sent Time to Message. Adds the current timestamp to the Siebel message.
Opportunity Sharing External Create
This Opportunity Sharing External Create workflow process is shown in Figure 4.
When this workflow is called, the following events happen:
- Create Source Key. Generates an internal key from the process property internal key description. Currently internal key description has a default value. This value can be changed manually or passed in from any workflow that calls this as a subprocess.
- Query ANI Keymap. Searches for a transfer record for this opportunity in ANI Keymap, the bus comp that stores all the transfer information.
- ANI Keymap Record Exist. Checks to see if the number of transfer records for this opportunity is greater than zero—that is, does a transfer record already exist for this opportunity?
- Insert Value into Keymap. If a transfer record for this opportunity does not already exist, creates a new transfer record for this opportunity.
- Update Value in Keymap. If a transfer record for this opportunity already exists, updates the transfer status to Transfer In Progress.
- Create Siebel Message. Calls Opportunity Sharing Build Siebel Message, passing in the internal key, internal key description, partner id, and object id. Returns a Siebel message.
- Get Rid of Extra Message Layer. Removes the extra layer that is added to a Siebel message when it is passed up from a subprocess.
- Output Siebel Message. Checks to see if the value of the process property "Write Orig File" is Y or N.
- Find Port. Finds the web service port for the partner the opportunity is being sent to.
- Transfer. Sends the opportunity to the other system.
- Update Status to Failed. If the transfer step returns an exception, updates the transfer status of the opportunity to Transfer Unsuccessful.
- Write Response. Checks to see if the value of the process property "Write Response to File" is Y or N.
- Write Siebel Message. If Write Orig File is Y, this step writes the pretransfer Siebel message to an xml file. If Write Response to File is Y, this step writes the post-transfer Siebel message to an xml file.
- Receive Create Response. Calls the subprocess Oppty Sharing Receive Create Response, passing it the Siebel message received from the transfer.
Opportunity Sharing External Query
The Opportunity Sharing External Query workflow process is shown in Figure 5.
When this workflow is called, the following events happen:
- Get Dest Org Id. Calls Opportunity Sharing Inbound or Outbound. This will return the partner id of the partner we are requesting an update from, the external key, and external key description.
- Set Status. Updates the transfer status to Update Pending.
- Create Message/Store Message/Append Message. Creates an empty Siebel message.
- Generate Key. Creates the internal key.
- Add Internal Key. Adds the internal key to the Siebel message.
- Add Internal Key Description. Adds the internal key description to the Siebel message.
- Add External Key. Adds the external key to the Siebel message.
- Add External Key Description. Adds the external key description to the Siebel message.
- Find Port. Finds the web service port for the partner.
- Send Oppty Update Request. Sends this Siebel message to the other system, and returns the response from the other system.
- Get Request Update Status. Gets the transfer status from the response Siebel message.
- Request Update Ok. Checks that the transfer status is successful.
- Update Opportunity. Calls Opportunity Sharing Siebel Update as a subprocess, passing it the Siebel message. Returns the response Siebel message.
- Remove Extra Message Layer. Removes the extra layer that is added when a Siebel message is passed up from a subprocess.
- Get Update Oppty Status. Retrieves the status of the update from the Siebel message that Opportunity Sharing Siebel Update inserts before returning the message.
- Status Ok. Checks to see if the update status is Update Successful.
- Swap Addresses. Swaps the Source Organization and Channel Partner information, the internal key and external key, and the internal key description and the external key description.
- Remove Extra Layer from Message. When a Siebel message is passed up from a subprocess it adds an extra layer to the message. This step removes that layer.
- Add Method Name. Inserts the name of this method, Query, into the Siebel message. This will be used in a later workflow.
- Find Response Port. Finds web service port for sending an update response for this partner.
- Transfer Response. Transfers the Siebel message with the update status back to the partner.
- Update Status. If any of the transfer statuses from the Siebel message are Update Unsuccessful or any of the transfers returns an exception, updates the transfer status to Update Unsuccessful.
Opportunity Sharing External Update
The Opportunity Sharing External Update workflow process is shown in Figure 6.
When this workflow is called, the following events happen:
- Build Message. Calls the subprocess Opportunity Sharing Set Update Status, passing in the opportunity id. Returns the partner id and a Siebel message.
- Get Rid of Extra Siebel Message Layer. Removes the extra layer that is added to a Siebel message when it is passed up from a subprocess.
- Write Siebel Message. Checks to see if the value of the process property "Write Orig File" is Y Or N.
- Find Port. Finds the web service port for the partner.
- Transfer. Sends the opportunity to the other system and returns a response Siebel message.
- Write Response to File. Checks to see if value of the process property "Write Response" is Y or N.
- Receive Update Response. Calls the subprocess Opportunity Sharing Receive Update Response, passing it the response Siebel message.
- Write to File. If Write Orig File is Y, writes the pre-transfer Siebel message to an xml file. If Write Response to File is Y, writes the post-transfer Siebel message to an xml file.
- Set Status to Failed. If transfer returns an exception, updates the transfer status for this opportunity to Update Unsuccessful.
Opportunity Sharing Inbound or Outbound
The Opportunity Sharing Build Siebel Message workflow process is shown in Figure 7.
When this workflow is called, the following event happens:
- Get Inbound Partner Id. Queries the ANI Keymap bus comp and retrieves the initial direction, the partner id, the external key, and the external key description of this opportunity.
Opportunity Sharing Pick Partner
The Opportunity Sharing Pick Partner workflow process is shown in Figure 8.
When this workflow is called, the following events happen:
- Catch Partner Id. Retrieves the partner id of the partner we are sending the opportunity to and stores it in a process property.
- Send Opportunity. Calls Oppty Sharing External Create, passing it the partner id.
Opportunity Sharing Receive Create Response
The Opportunity Sharing Receive Create Response workflow process is shown in Figure 9.
When this workflow is called, the following events happen:
- Get External Key. Finds the value of the external key in the Siebel message and returns it.
- Get External Key Desc. Finds the external key description in the Siebel message and returns it.
- Get Internal Key. Finds the value of the internal key in the Siebel message and returns it.
- Get Internal Key Description. Finds the value of the internal key description in the Siebel message and returns it.
- Get Status. Returns the transfer status from the Siebel message.
- Get Status Message. Returns the transfer status message from the Siebel message.
- Get Last Update Time. Retrieves the time when the Siebel message was created, which was added to the Siebel message when it was created.
- Insert Values into Keymap Bus Comp. Adds the external key, external key description, status, and the timestamp to the keymap record.
Opportunity Sharing Receive Update Response
The Opportunity Sharing Receive Update Response workflow process is shown in Figure 10.
When this workflow is called, the following events happen:
- Get Method. Returns the method value from the Siebel message. Both update and query use Opportunity Sharing Receive Update Response, and this method value tells the workflow whether this is a send update or receive update.
- Query Response. Checks to see if this is a response from an update or if this is a response from a query.
- Get Internal Key/Get Internal Key Description/Parse Key/Query Opportunity. If this is a response from a query, this workflow is started from the inbound web services, so there is no active object id. The workflow needs to find the opportunity and retrieve the object id. This group of steps returns the external key and the external key description and create a search specification from them. Query Opportunity will use this search specification to find the opportunity and return its object id. If this is a response from an update, the workflow is activated from the Opportunity Sharing External Update workflow and an object id is passed in as an argument, so these steps are unnecessary and are skipped.
- Get Status. Returns the transfer status from the Siebel message.
- Get Status Message. Returns the transfer status message from the Siebel message.
- Get Last Update Time. Retrieves the time when the Siebel message was created, which was added to the Siebel message when it was created.
- Update Status and Time. Updates the status and the timestamp to the keymap record.
Opportunity Sharing Set Update Status
The Opportunity Sharing Set Update Status workflow process is shown in Figure 11.
When this workflow is called, the following events happen:
- Get Dest Key. Calls Opportunity Sharing Inbound or Outbound and returns the partner id, external key, external key description.
- Generate Key. Generates an internal key from the process property internal key description. Currently internal key description has a default value. This value can be changed manually or passed in from any workflow that calls this as a subprocess.
- Update Status. Updates the transfer status to Update Pending.
- Create Siebel Message. Calls Opportunity Sharing Build Siebel Message, passing in an object id, partner id, external key, external key description, internal key, and internal key description. It returns a Siebel message.
- Get Rid of Extra Message Layer. Gets rid of the extra layer that is added to a Siebel message when it is passed up from a subprocess.
Opportunity Sharing Siebel Create
The Opportunity Sharing Siebel Create workflow process is shown in Figure 12.
When this workflow is called, the following events happen:
- Get Opportunity. Retrieves the opportunity property set from the Siebel message.
- Query Opportunity. Using the opportunity property set, searches for the opportunity in this database and returns the number of opportunities that match that the search specification.
- Oppty Exists. Checks to see if the number of opportunities found by the query is greater than zero, to determine whether the opportunity already exists.
- Set Opportunity Error Status. If the opportunity already exists, sets the status process property to an error status and sets the status message process property to the appropriate error message.
- Get External DUNS Number. If the opportunity does not exist, retrieves the Source Organization's DUNS number.
- DUNS Num Exists. Checks to see if the previous step returns an empty DUNS Number.
- Set Partner DUNS Error Status. If the DUNS number is empty, sets the status process property and sets the status message process property to the appropriate error message.
- Retrieve Record Id. If the DUNS Number has a value, uses that value to find the partner id of source organization.
- Partner Exists. Checks to see if the previous step returns an empty partner id.
- Set Partner Id Error Status. If the partner id is empty, sets the status process property and set the status message process property to the appropriate error message.
- Add Account. Calls PRM ANI Inbound Create Account Process, passing it the Siebel message, the name of the account integration object this process uses, and the account object hierarchy path. It returns an account status code and an account status message.
- Account OK. Checks to see if the account status code equals the general error code.
- Set Account Error Status. If the account status code returned a general error, sets the status process property to an error status and set the status message process property to the appropriate error message.
- Upsert Opportunity. Inserts the opportunity property set into the system.
- Set Oppty Error Status. If the opportunity insert returns an exception, sets the status process property to an error status and sets the status message process property to the appropriate error message.
- Get External Key. Finds the value of the external key in the Siebel message and returns it.
- Get External Desc. Finds the external key description in the Siebel message and returns it.
- Create Internal Key. Generates an internal key from the process property internal key description. Currently internal key description has a default value. This value can be changed manually or passed in from any workflow that calls this as a subprocess.
- Swap Addresses. Swaps the Source Organization and Channel Partner information, the internal key and external key, and the internal key description and the external key description.
- Remove Extra Message Layer. When a Siebel message is passed up from a subprocess it adds an extra layer to the message. This step removes that layer.
- Insert Values into Keymap Bus Comp. Creates a new transfer record for this opportunity.
- Set Status OK. Sets the status process property to successful.
- Add Status. Adds the status to the Siebel message. This is done whether there has been a problem and the status is an error code or whether status is ok.
- Add Status Message. Adds the status message to the Siebel message.
Opportunity Sharing Siebel Query
The Opportunity Sharing Siebel Query workflow process is shown in Figure 13.
When this workflow is called, the following events happen:
- Get Internal Key. Finds the value of the internal key in the Siebel message and returns it.
- Get Internal Desc. Finds the internal key description in the Siebel message and returns it.
- Parse Key. Takes in internal key and internal key description and creates a search specification.
- Get Opportunity. Searches for the opportunity using the search specification.
- Opportunity Exists. Checks to see if the number of opportunities found by the query is greater than zero to determine if the opportunity already exists.
- Add Error Status. If the opportunity does not exist, sets the transfer status in the Siebel message to an error status.
- Add Error Message. If the opportunity does not exist, sets the transfer status message in the Siebel message to an error status message.
- Set Update Status and Create Siebel Message. Calls Opportunity Sharing Set Update Status, passing it the opportunity id.
- Get Rid of Extra Message Layer. Removes the extra layer that is added to a Siebel message when it is passed up from a subprocess.
Opportunity Sharing Siebel Update
The Opportunity Sharing Siebel Update workflow process is shown in Figure 14.
When this workflow is called, the following events happen:
- Get Internal Key. Finds the value of the internal key in the Siebel message and returns it.
- Get Internal Key Description. Finds the internal key description in the Siebel message and returns it.
- Parse Key. Takes in internal key and internal key description and creates a search specification.
- Find Opportunity. Searches for the opportunity using the search specification.
- Opportunity Exists. Checks to see if the number of opportunities found by the query is greater than zero to determine if the opportunity already exists.
- Set Opportunity Error Status. If the opportunity does not exist, sets the status process property to an error status and set the status message process property to the appropriate error message.
- Get Opportunity. If the opportunity does exist, retrieves the opportunity property set from the Siebel message.
- Insert Account. Calls PRM ANI Inbound Create Account Process, passing it the Siebel message, the name of the account integration object this process uses, and the Account Object Hierarchy Path. It returns an account status code and an account status message.
- Account OK. Checks to see if the account status code equals the general error code.
- Set Account Error Status. If the account status code returned a general error, sets the status process property to an error status and sets the status message process property to the appropriate error message.
- Upsert Opportunity. Updates the opportunity.
- Get External Key. Retrieves the external key from the Siebel message.
- Get External Key Description. Retrieves the external key description from the Siebel message.
- Swap Addresses. Swaps the Source Organization and Channel Partner information, the internal key and external key, and the internal key description and the external key description.
- Remove Extra Message Layer. When a Siebel message is passed up from a subprocess it adds an extra layer to the message. This step removes that layer.
- Set Oppty Error Status. If the opportunity update returns an exception, sets the status process property to an error status and sets the status message process property to the appropriate error message.
- Update Status. Updates the transfer status and the timestamp for this transfer record.
- Set OK Status. Sets the status process property to successful.
- Add Status. Adds the status to the Siebel message. This is done whether there has been a problem and the status is an error code or whether the status is ok.
- Add Status Message. Adds the status message to the Siebel message.
PRM ANI Inbound Create Account Process
The PRM ANI Inbound Create Account workflow process is used by both opportunity transfer and shopping cart transfer. It is covered in PRM ANI Inbound Create Account Process.
PRM ANI Inbound Addressing Change Process
The PRM ANI Inbound Addressing Change workflow process is used by both opportunity transfer and shopping cart transfer. It is covered in PRM ANI Inbound Addressing Change Process.
Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
Siebel Partner Relationship Management Administration Guide Published: 18 April 2003 |