Event Based Processing

Async CPMs and Interface Configs

CX Version: 

When using async CPMs, DO NOT leverage interface configs. An async CPM may run on any of the site's interfaces, regardless of which original interface triggered the logic! Oracle states that this is "working as designed," meaning they are unlikely to fix this issue anytime in the near future.

New CPM Logging Tools

CX Version: 

Some long-awaited CPM logging features have arrived in recent versions of Service Cloud. Now it's possible to inspect the health of CPMs in two ways, and collections of CPMs can be imported and exported.

Seamless Async CPM Updates

Async CPM jobs are processed by Oracle's SPM queue, but the actual PHP code runs on any number of utility servers (likely based on some load-balancing logic for the pod). The custom CPM code itself runs in a looping PHP process that executes jobs from the queue, which means that the code stays in memory for a period of time. (To my knowledge, Oracle hasn't published any information as to exactly how long these processes run, however.) This causes two important results:

AddIn Post-Build Event v2

Tags: 

When building add-ins it's helpful to copy the compiled DLLs to the RightNow dev mode folder so that they're ready for development testing. If you then automatically create ZIPs of the output then you're ready for production deployment without any additional effort. (This is assuming you publish your add-ins as ZIPs and not DLLs.)

Async CPM Development and "My Code's Not Updating!"

While developing asynchronous CPMs, you'll notice that when you make a code change, the site logic may or may not update immediately. In fact, sometimes you may run the CPM and it will appear to use your old code, then the next time it will use your new code, then vice-versa! This is due to the fact that Oracle 'caches' the async code in memory

cURL and Async CPMs

CX Version: 

If you are using cURL in an asynchronous CPM to post data to an external endpoint, beware. Calling the \load_curl() method will usually load the cURL library, unless the back-end SPM process that runs your particular instance of the CPM already loaded the library! In this case the CPM will fail, in what appears to be an inconsistently reproducible way.

Get in the habit of wrapping your \load_curl() method like this:

if (!function_exists("\curl_init"))
{
    \load_curl();
}

Duplicate Contacts and Unique Fields

In order to reduce duplicate contact records, it would be useful to be able to specify unique contact fields (such as mobile phone number, or a particular custom field), similar to how email addresses are handled as unique identifiers. If the client needs a full-fledged solution for this across their entire system, this is difficult to do from a purely technical level. Most clients simply train their agents to first search for existing contacts and have a business process for merging duplicate contacts when manually found in the system, which is good enough for most.

CPMs: Custom Process Management

Custom Process Models are perhaps some of the most useful features released for developers since custom objects in the Nov '10 release. We now have the ability to run server 'events' on both standard and custom objects. But when you start working with the Process Designer (under Site Configuration in the console) you will notice that the UI and deployment process is extremely clunky. This article describes how to setup a standard CP development cycle to upload code via WebDAV that is directly run in your CPM.

IEvent AddIns

Tags: 

A few specialized events are exposed through the add-in framework. These can be very helpful when trying to create a complete solution.

IEvent add-ins are very simple add-ins that exist for the lifetime of the session, they don't support user interface elements and only provide notification
of events.

There are two main categories of events:

Updated: SP5 (in CX 13.2) Commit Bug w/ active CPM

Updated 2013-12-17: Additional tests found that this issue only manifests when a CPM is active on an object. The post has been updated to reflect the new findings

Pages

Zircon - This is a contributing Drupal Theme
Design by WeebPal.