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.
Can I use custom scripts with reports in our Oracle B2C Service application?
Environment:
Custom Scripts in Analytics
Resolution:
This content is applicable for Oracle B2C Service up through version 20C. For versions 20D and later, see Answer ID 11780: Custom Scripts Replacement by Analytics Extensions for best practices.
When creating custom reports in Oracle B2C Service, there are numerous features included to allow users the ability to customize and configure custom reports. Most users will be able to define and create reports using the features within the Oracle B2C Service application itself.
The custom scripts feature allows you to define a specific PHP script that is run when the report is generated. This allows you to further act on, manipulate, and format the data in your report -- even beyond the standard features available. For example, custom scripts can be used to convert a row of data into a table, remove unwanted data, or create a link to another page. Analytics custom script functionality is not intended, and should not be used for any other purpose, such as for running PHP scripts on a report schedule (instead of using a custom CRON configuration) or for making public API requests.
Custom scripts must be written in PHP. Therefore, you should not attempt to create or implement a custom script unless you are familiar with the PHP scripting language and programming concepts. For official documentation and information on PHP, refer to http://www.php.net/.
Note: Custom scripts only run while using the report from the Oracle B2C Service console. These same reports do not run the custom scripts while used from the Customer Portal Pages.
To add a custom script to a report:
Array ( [0] => Account ID [1] => Full Name )
$rows[0][0]->val = $rows[0][0]->val + 22; $rows[0][1]->val = 'Link'; $rows[0][1]->url = 'http://vendorurl.com/';
For an example of custom script code, refer to standard report "Visit Activity" (report ID 46). To view the custom script right-click on the report from the Reports Explorer and select "View Definition". The custom script code is located at the bottom of the report definition.
For additional information, refer to the 'Create a custom script' section in the Online Help User Guide documentation. To access Oracle B2C Service manuals and documentation online, refer to the Documentation for Oracle B2C Service Products.
Troubleshooting custom scripts requires the involvement of Oracle Consulting. Associated fees for troubleshooting custom scripts must be coordinated through your Sales Account Manager.
Notes:
-- The CUSTOM_SCRIPT_DATA_SIZE configuration setting limits the size of the data buffer. If many null value rows are seen, this value may need to be increased. Further, increasing the value of this configuration can eliminate errors observed when running reports. These errors, when encountered in the agent console on running reports, can show up as follows:
"Unable to Communicate with Server" "Unexpected end of file has occurred" "The 'exec_rv' start tag on line 7 position 8 does not match the end tag of 'php_header'. Line 10, position 16." -- You can define PHP functions in the Initialization tab that may then be called from any of the other tabs. -- You may remove any given row by unsetting it in the Process tab (unset($rows[0])). -- The $rows[0] variable is a little misleading, as it is plural, but only contains a singular row being processed.