Search for existing answers to your product and support questions.
Familiarize yourself with our support site and learn best practices in working with our team.
Manage Service Requests, View and update service requests submitted by you and others in your organization.
Submit a new issue to our technical support team.
Oracle B2C Service insights from our Technical Support team subject matter experts
Browse resources to assist you in launching your implementation and ensure a successful go-live.
Access your OCI account.
Find product documentation for supported versions of B2C and documentation libraries for related service solutions.
You will have the tools to improve your customers' experience when you learn about all the things our products can do.
Find links for API documentation, Custom Processes, Customer Portal, and Agent Browser UI Extensibility Framework.
Explore how accelerators are designed to demonstrate how an integration scenario could be built using the public integration and extension capabilities of the Oracle B2C Service.
Prepare for a successful transition by reviewing upcoming release changes and enhancements.
Explore webinars, events, and feature kits to learn about B2C Service features, functionality, and best practices from the technical experts.
Oracle MyLearn offers a portfolio of free and paid subscription-based learning resources to help you gain valuable skills, accelerate cloud adoption, increase productivity, and transform your business.
Empower your team with the skills to implement, configure, manage, and use your applications with Customer Experience Cloud Training.
Our goal is to facilitate a friendly, supportive environment where members can easily collaborate with each other on solutions and best practices.
Ask and answer questions specific to B2C.
This is an exciting resource intended to help with your Oracle Service Cloud Analytics.
Share product improvement ideas and enhancement requests with Oracle Development, while collaborating with other Oracle customers and partners.
Update your phone number, email notification preferences, and severity 1 and severity 2 contact preferences.
View the contact managers within your organization.
Find contact information of the Technical Account Manager (TAM) and Client Success Manager (CSM) for your organization.
Environment:
Process Designer, Custom Process Model (CPM), Service Process Model (SPM) All product versions
Resolution:
There are three main components of a Custom Process (or Object Event Handler):
1. The header:
/* * CPMObjectEventHandler: demo * Package: OracleServiceCloud * Objects: Contact, CO\TestCustomObject * Actions: Create, Update * Version: 1.4 */
- the header is required, even though it is commented - it will be read and used by the runtime - it contains information on the objects and actions supported by the script - the CPMObjectEventHandler name must match the class name and the test harness class (see examples below)
2. The implementation
- contains the required custom business logic to manipulate objects that are passed in at runtime - the apply() method does most of the work - the API version must match the one specified in the header - the class name must match the name specified in the header - the apply() function has 4 parameters: $run_mode (indicates if the script is running in a test harness or in production - 1 for production/live mode, 2 for tests run from Process Designer), $action (the event that triggered the execution - create, update or destroy), $object - the object executed on (e.g. Incident), $n_cycles (the number of execution loops the script has entered) - sample:
use \RightNow\Connect\v1_4 as RNCPHP; use \RightNow\CPM\v1 as RNCPM; class demo implements RNCPM\ObjectEventHandler { public static function apply($run_mode, $action, $obj, $n_cycles){ switch($action) { case RNCPM\ActionCreate: $verb="created"; break; case RNCPM\ActionUpdate: $verb="updated"; break; } } }
3. The test harness
- contains the required self-testing code - the name of the class must be the CPM name, underscore, TestHarness - the setup() function may instantiate helper objects used in the test - the fetchObject function creates/returns an object to be tested, which is then passed through the apply() function during the test - the validate() function checks to see if the results of the apply() execution are as expected. Messages can be printed here using echo - the cleanup() function can remove any objects created in the test - sample:
class demo_TestHarness implements RNCPM\ObjectEventHandler_TestHarness { public static function setup(){ return; } public static function fetchObject($action, $object_type){ $contact=$object_type::first('ID > 0'); echo "Fetched Contact ID ".$contact->ID; return($contact); } public static function validate($action, $object){ $pass=true; return($pass); } public static function cleanup(){ return; } }