Strategic Software Consultant

I'm the partner of choice for many of the world's leading enterprises. I help businesses elevate their value through solution discovery, software development, design, QA, and consultancy services. As your Strategic Software Consultant, I work across many technology products and delivery teams. The scope of technology is broad, and it is my job to understand how your technology applications holistically support and connect to create a sustainable technology ecosystem. The ecosystem of technologies may span to 3rd party applications, in-house developed solutions, business intelligence, data integrations, and of course, SaaS applications.

Oracle Certified Specialist
Customer Portal Oracle B2C Service

B2B Service Category Import Controller

<?php
namespace Custom\Controllers;

use \RightNow\Connect\v1_4 as RNCPHP;

class Import extends \RightNow\Controllers\Base
{
    function __construct()
    {
        parent::__construct();
    }

    function categories(){
        $context = RNCPHP\ConnectAPI::getCurrentContext();
        $context->ApplicationContext = "Import Categories";


        $data = 'Communications,Comment/Suggestion';
        $data_parsed = explode(",", $data);

        try{
            $DisplayOrder = 0;
            foreach($data_parsed as $row){
                $DisplayOrder++;
                $ServiceCategory = new RNCPHP\ServiceCategory();
                $ServiceCategory->AdminVisibleInterfaces = new RNCPHP\NamedIDDeltaOptListArray();
                $ServiceCategory->AdminVisibleInterfaces[0] = new RNCPHP\NamedIDDeltaOptList();
                $ServiceCategory->AdminVisibleInterfaces[0]->ID = 1; //ID of the interface
                $ServiceCategory->DisplayOrder = $DisplayOrder;//Display position relative to other dispositions with the same parent

                $ServiceCategory->EndUserVisibleInterfaces = new RNCPHP\NamedIDDeltaOptListArray();
                $ServiceCategory->EndUserVisibleInterfaces[0] = new RNCPHP\NamedIDDeltaOptList();
                $ServiceCategory->EndUserVisibleInterfaces[0]->ID = 1; //ID of the interface

                //It is a required field Array of names, one for each supported language
                $ServiceCategory->Names = new RNCPHP\LabelRequiredArray();
                $ServiceCategory->Names[0] = new RNCPHP\LabelRequired();
                $ServiceCategory->Names[0]->LabelText = $row;
                $ServiceCategory->Names[0]->Language = new RNCPHP\NamedIDOptList();
                $ServiceCategory->Names[0]->Language->ID = 1;

                $ServiceCategory->save(RNCPHP\RNObject::SuppressAll);
            }
            echo "<br><br>DONE.";
        }
        catch (RNCPHP\RNCPHPAPIError $err) {
            echo($err->getCode() . "::" . $err->getMessage());
        }
        catch (\Exception $err) {
            echo($err->getCode() . "::" . $err->getMessage());
        }
    }
}