Quantcast
Viewing all 2504 articles
Browse latest View live

Add new entry - Incident Custom Field Menu (1 Comment)

Topic by Ian Oliver

Content

Hi All

 

Is it possible to add a new item to an Incident Custom Field Menu ?  I don't mean update an incident field, I need to add a new entry (if its not there already) to a custom menu field via connect PHP.

I have got the attached code block but I think this is to update the incident field rather than add a new menu item.

Cheers

Ian

 

Version

18B

Code Block


Adding a message to incident threads using the REST API (v1.3)

Topic by Haakon Løtveit

Content

I am talking to RightNow using REST. I have an incident, and I need to add a new message to the incident.

While I have searched for answers I have not found anything.

I have tried to post to {rightnow-base-url}/services/rest/connect/v1.3/incidents/{incident-id}/threads, put to the same, and a put {rightnow-base-url}/services/rest/connect/v1.3/incidents/{incident-id} but it didn't work.

Does anyone have any tips? Or even better a link to some docs that describe it?

Version

Using version 1.3 of the REST API of RightNow/Service Cloud

ROQL Select Query working in Connect Object Explorer but not in Custom Script

Topic by Anushree gandhi

Content

Hi All,

I am trying to fetch data from Contact and its child custom object.

My query is "Select ID , packageName$objectName$fieldName.fieldName1 , packageName$objectName$fieldName.fieldName2  from Contact where ContactID is not null LIMIT 10"

The same query is working in Connect object explorer but when i try it in custom script it says 'Unknown table or column 'packageName'.

Thanks in Advance!

 

 

Version

Connect v1.3

StatusCode: Unauthorized (7 Comments)

Topic by Sérgio Braun

Content

Hi! I'm getting a problems with the connection between my code and REST API.
Was added in the header my authentication (Basic authentication) and header ("OSvC-CREST-Application-Context"), but a error appear.

**I'm using v1.3**

In attachment a error.

Code Block

Image

Image may be NSFW.
Clik here to view.

Mail Message Recipient Limit

Topic by John L

Content

Hi all,

I have a report that contains fields from a handful of custom objects and some additional columns that have functions to calculate some data from these columns. This report also contains a script which, based on the value of the computed column, will send an email to a contact. This script works fine, but produces the error below after 200 emails are sent:

Error: Mail message send failed: Number of email recipients 201 exceeds the remaining allowable recipients 0. Please configure number of email recipients to be lower than remaining available recipients.

It's clear to me that there is a limit of 200 emails that can be sent at a time. Is there a way to adjust the max allowable recipients? If not, is there some other way to circumvent this limitation in the report script or otherwise?

Version

Feb 2017

Creating a Task from an incident and copying values (1 Comment)

Topic by Neil

Content

Hi,

I'm trying to create a CPM myself for the first time, and I'm running into difficulties.

My end-goal is to trigger the CPM from our incident Business Rules. The CPM should then create a task, and link it back to the incident. I'd then like to copy certain field values from the incident.

As a starting point, I've attempted to use the sample code from the documentation, but I'm still missing something.

Here is the full code from the CPM File:

<?php
/*
* CPMObjectEventHandler: Create_SMS_Task_CPM
* Package: RN
* Objects: Incident, Contact, Task
* Actions: Create,Update
* Version: 1.2
* Purpose: Create SMS Task when on saving incident
*/

// Specify a versioned namespace for the Connect PHP API
use RightNow\Connect\v1_2 as RNCPHP;

class Create_SMS_Task_CPM
    implements RNCPM\ObjectEventHandler
    
try{
    $new_task=new RNCPHP\Task();
    
    //Set assigned account
    $new_task->AssignedToAccount = RNCPHP\Account::fetch(9);
 
    //Set comment
    $new_task->Comment= "New task";
     
    //Set Completed time
    $new_task->CompletedTime=mktime(0,0,0,11,11,2018);
     
    //Set contact
    $new_task->Contact = RNCPHP\Contact::fetch(2039);
                        
    //Set due time
    $new_task->DueTime=mktime(0,0,0,14,11,2018);
     
    // Add FileAttachment
    $new_task->FileAttachments =new RNCPHP\FileAttachmentCommonArray();
    $fattach = new RNCPHP\FileAttachmentCommon();
    $fattach->ContentType = "text/text";
    $fp = $fattach->makeFile();
    fwrite($fp,"Making some notes in this text file for the Task".date("Y-m-d h:i:s"));
    fclose($fp);
    $fattach->FileName = "NewTextFile".date("Y-m-d_h_i_s").".txt";
    $fattach->Name = "New Text File ".date("Y-m-d h:i:s").".txt";
    $new_task->FileAttachments[] = $fattach;
    
    //Set Inherit
    $new_task->Inherit=new RNCPHP\InheritOptions();
    $new_task->Inherit->InheritContact=true;
    $new_task->Inherit->InheritOrganization=true;
    $new_task->Inherit->InheritStaffAssignment=true;
 
    //Set Name
    $new_task->Name="sample_task";
 
    //Add notes
    $new_task->Notes = new RNCPHP\NoteArray();
    $new_task->Notes[0] = new RNCPHP\Note();
    $new_task->Notes[0]->Channel = new RNCPHP\NamedIDLabel();
    $new_task->Notes[0]->Channel->LookupName = "Email";
    $new_task->Notes[0]->Text = "Sample task Notes 1";
    $new_task->Notes[1] = new RNCPHP\Note();
    $new_task->Notes[1]->Channel = new RNCPHP\NamedIDLabel();
    $new_task->Notes[1]->Channel->LookupName = "Phone";
    $new_task->Notes[1]->Text = "Sample task Notes 2";
    
    //Set Percent complete
    $new_task->PercentComplete=90;
     
    //Set Planned completion time
    $new_task->PlannedCompletionTime=mktime(0,0,0,5,11,2018);
 
    //Set Priority
    $new_task->Priority= new RNCPHP\NamedIDOptList();
    $new_task->Priority->ID=1;
     
    //Set Opportunity
    $new_task->SalesSettings=new RNCPHP\TaskSalesSettings();
    $new_task->SalesSettings->Opportunity= RNCPHP\Opportunity::fetch(9);
     
    //Add Answer and Incident
    $new_task->ServiceSettings=new RNCPHP\TaskServiceSettings();
    $new_task->ServiceSettings->Incident=RNCPHP\Incident::fetch(714057);
     
    //Set Start time
    $new_task->StartTime=mktime(0,0,0,10,10,2018);
    
    //Set the current status
    $new_task->StatusWithType = new RNCPHP\StatusWithType();
    $new_task->StatusWithType->Status->ID = 18;
     
    // Set Task template
    // $new_task->TaskTemplate=new RNCPHP\NamedIDLabel();
    // $new_task->TaskTemplate->ID=1;
 
    //Set Task type
    $new_task->TaskType=new RNCPHP\NamedIDOptList();
    $new_task->TaskType->ID=2;
 
    $new_task->save();
    echo "Task object has been created successfully with ID {$new_task->ID}";
}
 
catch (Exception $err ){
    echo $err->getMessage();
}

I'd be grateful if someone could give me some pointers please!

Code Block

Creating an Incident via SOAP web services

Topic by Ian Oliver

Content

Hi All

We are needing to create incidents via a SOAP request via web services and are struggling to populate incident object fields and incident custom fields.  I am pretty sure some where on here I have seen examples (i have scoured the documentation but to no prevail) of this but cant seem to find it anywhere. 

Below is what we are sending but this fails, if we take off  AssignedTo, Queue and Status it works.

So what we are after is a full breakdown of the <RNOnjects xsi: type="v11:Incident"> and also how we populate custom fields.

From the documentation I see what format we have to use. But when we apply that format it doesn't work.

Does anyone have any help ?

Cheers

Ian

Code Block

Limit of Rows Returned in ROQL QueryResults

Topic by Didi Daman

Content

I am querying using ROQL which works ok, but there appears to be a limit of 20000 rows that are returned? I don't see this limit anywhere? Please advise if it can be changed. 

 

Get Query : https://xxxxxx.custhelp.com/services/rest/connect/v1.3/queryResults/?query=select s.organization, s.Incident,   s.id as sClaimID,s.sclaim_ref_num, s.createdTime, s.status.LookupName as source, s.recovered_amount from CO.sClaim s;

 

Results: 

"items": [
        {
            "tableName": "Table0",
            "count": 20000,
            "columnNames": [
                "Organization",
                "Incident",
                "sClaimID",
                "sclaim_ref_num",
                "createdTime",
                "source",
                "recovered_amount"
            ],
            "rows": [
                [.........

Version

v1.3

Code Block


Update custom field Add-in (5 Comments)

Topic by Sérgio Braun

Content

Hi all!

I not getting the custom fields via C#. I need update a custom field via Add-in.
How can I do?

My field:
Name: "incident.c$enderco"
Label: "Endereço do chamado"
Type: "text field"
Id: 16

I tried with the followiong code:

Code Block

Custom Object Add-In (1 Comment)

Topic by Sérgio Braun

Hi all!
How can I access / update a custom object?

Have this example:
Custom object (CO$Correio);
Fields: Numero (CO$Correio.Numero) and Servico (CO$Correio.Servico);
This object is "Contacts" son;

I need create a new register and link with a Contact.

Assing a contact c# (3 Comments)

Topic by Sérgio Braun

Hi all!
How can I assign a contact and account to an Incident via Add-In?
I seen the Interface "inc2Contact", but, I don't getted do the implementation.

Is it possible to send feedback within Chatbox? (1 Comment)

Topic by Shaheela D

Content

Hi All,

I want to send a feedback message within chatbox when the chat completes. It is possible to send survey link into chatbox. But I dont want to send surveylink. 

Once the agent completes the chat with the customer,the feedback survey will send to the customer chat immediately. Is is possible to do or not?

Kindly guide us if it is possible.

Thanks,

Shaheela

Version

Service cloud August 2017

writting to csv file

Topic by Bibek Jena

Content

Hi ,

i have a requirement where i need to fetch data from database and write into a csv file .

I am not able to write any data into the csv file,csv file that i am getting is blank csv file.

i have tried fpucsv() and fwrite () to write the data.

i am trying this in file manager script.

Attached the code which i have tried.

Thanks.

 

Version

v1.3

Code Block

C# Code to create custom object on RightNow (5 Comments)

Topic by SAJI MATHEW

Content

I think most of the developers come across the requirement to integrate third-party application with RN system. Sometimes we might need to create entries in the Custom object. Here is the sample code to create custom object entries in RN CO.

Code Block

File

UpdateEXOrderHistory.cs(5KB)

Multi-Select field in Workspace. (11 Comments)

Topic by Darsen Prasad

Content

Hi 

I need to create a field in workspace which will be of kind Menu. But the requirment is to have a multi-select dropdown for the menu field.

Currently I am using a checkboxlist, but i need to change that to dropdown field.

Can I integrate any third party dll to achieve this functionality / is there any out of the box controls available ?

I tried integrating a DLL which creates a multi-select dropdown, but it's showing exception for loading assembly.

"Could not load the assembly....."

Attached the screenshot of the control I need.

Please share your thoughts into this issues.

Waiting for response,

Darsen P

 

Version

Feb 2013

Image

Image may be NSFW.
Clik here to view.

Chat API authentication SOAP request (12 Comments)

Topic by Chakravarthy Elchuri

Content

Hi,

If any one having sample SOAP request for Chat API authentication please post here.

i am getting an error response as

<faultcode>soapenv:Server</faultcode>
 <faultstring>Operation Not Found</faultstring>

 

 

thanks,

Chakravarthy

 

Code Block

Get Field Value Using Javascript API (2 Comments)

Topic by Ziv S

Content

Hi everyone,

As part of a function that I'm working on, I need to get the ID of the incident's queue using JS API. I was able to find the syntax for getting the value of a custom field in the documentation ("GetCustomFieldByName)", but not for system/standard fields like Queue.

Can anyone share how to get the ID of the incident's queue? Let's assume that I have defined my incident variable as follows:

var inc = window.external.Incident;

Thanks in advance.
Ziv

Version

OSC 18A (Feb 2018)

ROQL Select Query working in Connect Object Explorer but not in Custom Script (1 Comment)

Topic by Anushree gandhi

Content

Hi All,

I am trying to fetch data from Contact and its child custom object.

My query is "Select ID , packageName$objectName$fieldName.fieldName1 , packageName$objectName$fieldName.fieldName2  from Contact where ContactID is not null LIMIT 10"

The same query is working in Connect object explorer but when i try it in custom script it says 'Unknown table or column 'packageName'.

Thanks in Advance!

 

 

Version

Connect v1.3

Communication CPQ and RightNow (2 Comments)

Topic by Apolinar Valdez

Hi guys

Currently, CPQ automatically sends an email to any user, at the same time that CPQ mail is sent, it is necessary to activate an integration that communicates with RightNow and creates an incident automatically.

This may be possible, or am I being very demanding?

Thank you very much for your time

REST API: how to overwrite instead of add to a namedIdHierarchy object on PATCH

Topic by Joel Sunaz

I'm trying to update the product and category in an answer record but I need the new value(s) to REPLACE the existing values and not add them as additional product/category which are namedIdHierarchy objects. Below is a sample JSON I pass to a PATCH http request:

{
"products" : [{
          "id" : 117
    },
    {
        "id" : 123
    }
],
"categories" : [{
      "id" : 154
    },
     {
     "id" : 160
     }
]
}

I tried nulling them out first and then send another request with the new values but this will impact performance as this will now require 2 separate requests.

Viewing all 2504 articles
Browse latest View live