Quantcast
Channel: Discussion Forum > Connect Data Services
Viewing all 2504 articles
Browse latest View live

File attachment operations - C#, Java and SOAP (6 Comments)

$
0
0

Topic by Pramod Vasudeva Murthy

Content

Dear RN Fraternity,

Recently I had to work with Fileattachment operations via C# using Web Services. This included a Custom object and Standard Object file attachments. I searched in community and the info was scattered. So, I stretched a bit and created a single source code to upload and download files from/to a directory.

I am also sharing same in Java and SOAP requests and responses as well.

PFA.

PS: I had tested this code and is currently running in prod, so this is error free wink

~VIP

Version

May 2016

File

File_attachment_operation.zip(1.2MB)

create notification toaster from php (5 Comments)

$
0
0

Topic by Magiva

Hi

 

Im wanting to be able to create a notification pop up toaster from php that all logged in users would see (or a group of users)

Does anyone know how to create a notification entry ?

 

thanks

Get a specific column from the RightNow Table rather than the complete object (1 Comment)

$
0
0

Topic by Ajith Errabelly

Content

Below is the code which I use to get the complete rightnow object for a specific ID. But I want only just one column of that object like status_id for the id 123. 

Code Block

Update a row/field in RightNow, where the criteria is not primary key to search the row (2 Comments)

$
0
0

Topic by Ajith Errabelly

Content

The Below is the block of code where I search for a row using ID of that table, but my search criteria needs one more column along with the primary key. How do I add that column in search criteria in the below code block.

We would like to create the update query with the "and" condition from the column that is not the primary key.
Eg.
We would like to update the status to "Complete" for the ID = 123 "and" 124 for the regular SQL we would like something like below.

update Artrim set STATUS_ID= '3', COMMENT = 'Update Pending to Complete' where STATUS_ID= '2' and ID in (123, 124);

How about the RightNow Service API? We tried to put the "and" condition for non Primary key

Version

Feb 2017

Code Block

Change incident primary contact in 1 api call? (5 Comments)

$
0
0

Topic by Charlie Mopps

I make an API call to change the contact on an incident. But it seems to set the contact, I need to know the c_id. So I have to make 2 api calls... 1 to look up the contact via a custom field or email address and then a second to set the contacts primary contact to the id I found in the lookup. But one of my external applications has a technical limitation that makes 2 calls difficult.

  1. Is there an easier way to do this in a single call?
  2. Do I have to use Chaining? If so, is there a decent example of what I'm talking about anywhere? I've been trying to setup chaining in a C# applicaiton but the RN API is odd to say the least and I'm not making a lot of progress.

Thanks!

Zip a file (1 Comment)

$
0
0

Topic by Bibek Jena

Content

Hi All,

I am trying to fetch the data using QueryCSV and write the data to a file  .The file we got needs to be zipped.

We are trying the above requirement in File Manager script.

We have tried zipping using ZipArchive() function but it seems Oracle RightNow doesnot support the function.

Do we have any other function to zip a file in File Manger.

Any help would be Appreciated.

Thanks and Regards,

Bibek Kumar Jena

Version

v1.3

Code Block

Calling Library Files from Fie Manager (1 Comment)

$
0
0

Topic by Bibek Jena

Content

Hi All,

I want to call a library file from FileManager Script .But it seems you cant call from File Manager ,I have tried below lines:

use \Custom\Libraries\CPM as CPMHandler;
const DEV_MODE = true;
define('APPPATH',DEV_MODE ?__DIR__ . "/scripts/cp/customer/development/" :__DIR__ . "/scripts/cp/generated/production/optimized/");
require_once APPPATH . "libraries/CPM/*****.php";
 

Can Anyone tell me if i can call library file from File Manager .If yes ,How can we call?

Any help would be appreciated.

Thanks and Regards,

Bibek

Version

v1.3

Can't Retrieve Configs by Name (2 Comments)

$
0
0

Topic by Mike Waldron

Here's a new wrinkle. When I try this in a file manager custom script on a May 2017 site

$this->val = RNCPHP\Configuration::fetch('CUSTOM_CFG_VALID_CONFIG_NAME')->Value;

I get the error Invalid ID: No Configuration record found with LookupName = '(1000004)' If I change that line of code so it reads

$this->val = RNCPHP\Configuration::fetch(1000004)->Value;

then it works fine, and I get the expected value. Has anyone run into this before? Why would the config name not be an acceptable value to fetch()? The config name is copied-and-pasted, so I'm not misspelling it. I've tried it with single and double quotes just for the heck of it, but nothing seems to work.


Event notifications in Rightnow webservices (8 Comments)

$
0
0

Topic by Pramod Vasudeva Murthy

Content

Hi Folks,

My team was trying to discover event notifications when a record updates. We were following this post.

We are not sure where to have the SOAP XML hosted. How does the event work?

  • Do we need to hit RN server with given SOAP request so to initialize first?
  • After that do we need to use CPM to drive it?
  • If we use CPM, what is the use of EventNotifications?

If anyone has implemented this, please suggest.

~VIP

Version

17D

Auto Save Incident (4 Comments)

$
0
0

Topic by Andrew Wooster

Content

I am looking for a best practice in automatically saving an incident.  When an agent gets a call we automatically create an incident, if the customer's phone number is recorded in the Service Cloud we automatically assign the contact, otherwise it is left blank.  We are having an issue with agents clicking on the "X" button to close the incident which does not save the incident.  Which API is best suited for automatically saving the incident and if there is no contact associated with the incident, prompting the agent to select a contact and then saving the incident.

Version

17D

WSDL Woes ~ Strange error that stops development before we can begin (8 Comments)

$
0
0

Topic by Billy Clark

Hello all,

 

  I have a problem when connecting to the WSDL address.  I'm using Visual Studio currently, but even SVCUTIL is giving me errors.  I'd really like to start a project where we can integrate with our Knowledgebase, and possibly leverage some of hte capabilities of RightNow.

When I add the Service Reference in VS, I get this error:

Warning 1 Custom tool warning: Cannot import wsdl:binding
Detail: An exception was thrown in a call to a policy import extension.
Extension: System.ServiceModel.Channels.SecurityBindingElementImporter
Error: An unsupported security policy assertion was detected during the security policy import: <sp:SignedSupportingTokens xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
          <wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy">
            <sp:IssuedToken sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
              <sp:RequestSecurityTokenTemplate>
                <t:TokenType xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512">http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0</t:TokenType>
                <t:KeyType xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512">http://docs.oasis-open.org/ws-sx/ws-trust/200512/Bearer</t:KeyType>
                <t:CanonicalizationAlgorithm xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512">ht...
XPath to Error Source: //wsdl:definitions[@targetNamespace='urn:wsdl.ws.rightnow.com/v1_2']/wsdl:binding[@name='RightNowFedAuthSyncBinding'] C:\Users\Billy\AppData\Local\Temporary Projects\RNC\Service References\ServiceReference1\Reference.svcmap 1 1 RNC
 
Is there something wrong with our implementation?

There is a second warning:

Warning 2 Custom tool warning: Cannot import wsdl:port
Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='urn:wsdl.ws.rightnow.com/v1_2']/wsdl:binding[@name='RightNowFedAuthSyncBinding']
XPath to Error Source: //wsdl:definitions[@targetNamespace='urn:wsdl.ws.rightnow.com/v1_2']/wsdl:service[@name='RightNowSyncService']/wsdl:port[@name='RightNowFedAuthSyncPort'] C:\Users\Billy\AppData\Local\Temporary Projects\RNC\Service References\ServiceReference1\Reference.svcmap 1 1 RNC
 
Any help would be appreciated.

Creating incident in Connect PHP (5 Comments)

$
0
0

Topic by Lorna

Hi,

We found that incidents that are created via Connect PHP do not seem to go through the incident business rules at all. We have even created a catch all rule without conditions under the initial state but incidents still do not change their rule state or trigger any rule.

These incidents showed 'No value' as rule state after creation. This has changed for most of them in the meantime as we activated the rule set and therefore they were moved to an existing rule state.

It is possible to create new incidents using the Connect PHP and they also show Public API > Connect PHP as source hierarchy. We would therefore expect that they go through the incident business rule that just like other incidents.

Is Connect PHP not a valid source for incident creation and if yes, why are the incidents still created? Are their any settings required to make this working? Do the incidents created via Connect PHP need to have any additional information to go to the initial rule state?

Fetch asset file by using CPM (1 Comment)

$
0
0

Topic by Seetha lakshmi

Hi All,

I have contact.csv file in our webdev asset folder. 

My scenario

Step 1: 

I have one schedule report, once the report get triggered at the time I have create one record in Custom Object.

Step 2 :

Once the record get inserted, I need to fetch the file from asset folder by using CPM. After fetching the file I need to insert that file under contact object (new contact need to create) (CPM)

Kindly give me some ideas to achieve this scenario 

Thanks

Seethalakhsmi

 

Is it possible to call external service while creating a Staff Account

$
0
0

Topic by Seetha lakshmi

Hi All,

In staff account we have a custom field. While saving the staff account if our custom field have any value then we need to call an external service.

We found that there is no option to wrote CPM for the staff account. So, kindly provide us any other way to achieve this functionality

 

Thanks,

Seethalakshmi

Best Practive Advise

$
0
0

Topic by Andrew Wooster

Content

We are working on a project that will do searches on external systems (web service calls) to bring back customer information and order information into the agent's Workspace in the Service Cloud.  I am planning on writing these Add-Ins in C# and I am wondering if these should be Workspace Add-Ins or Report Add-Ins?  I am planning on displaying the results in reports that are embedded into the Workspace.  The workflow will be as follows:

1. Search against 3-4 external systems with basic customer information (phone or email) and display results in a report on the Workspace.  This may have 1 customer or a list of customers.

2. Agent will select the correct customer.  To perform the next search for a list of orders, the agent will either double click the Contact in the report or push a button.  This will execute a search against 3-4 external systems and will return a list of orders.  This list will be displayed in another report on the Workspace (different tab).

3.  Agent will select the order the customer is calling about.  Again, either a double click or button push will execute the 3rd and final search to bring back the order details and display these details in another report (different tab).

At this point I am not looking to store any of the order related information in the Service Cloud, but this could be an option in the future.  I also want to make sure that displaying the results in a report is the correct way of presenting the information, as opposed to using custom fields or list boxes.

I appreciate any and all guidance with this.

Thanks,

Andrew

Version

17D

Public Mail API - multiple email addresses in "to" ? (2 Comments)

$
0
0

Topic by Ian Oliver

Hi All

I am trying to figure out how to put multiple emails in the $mm->To->EmailAddresses line of the code but cant seem to figure it out, have tried multiple ways but it keeps complaining when I run the script.

$mm->To->EmailAddresses= array($email1);

 

I have tried this but have had no luck:

$mm->To->EmailAddresses= array($email1, $email2, $email3);

Does anyone have any pointers ? the documentation doesnt explain how to do multiples.

Cheers!

Ian

Workspace Add-In Acces Virtual Table

$
0
0

Topic by Andrew Wooster

Content

I have a custom Add-In to create 3 virtual tables for displaying data in a workspace, I have accomplished this and created 3 reports containing the virtual data and added this to the workspace.  I need to call a Workspace Add-In when a button is pushed, call an external web service and then put the data returned by the web service into the virtual table.  Any guidance on how to add the data from the web service to the report would be very much appreciated.  I can see the reports in the _recordContext variable but I am not sure how to get the data into these reports.

Version

17D

C# and REST API: 401 error when setting "application/schema+json" header (2 Comments)

$
0
0

Topic by Rajan Davis

Content

I have been working on a light wrapper for the REST API in C# and have run into a really bizarre error that I only get in C#.

Whenever I set the "Accept" header to "application/schema+json", it will work as expected if I use the base REST API URL:

https://<interfacename>.custhelp.com/services/rest/connect/v1.3/
// Works as expected

However, if I change the URL to include a resource, it will return a 401 error

https://<interfacename>.custhelp.com/services/rest/connect/v1.3/incidents
// returns a 401 error

From what I understand, in C#, you can only modify the accept header either with the HttpWebRequest or HttpClient classes.

In both cases, I run into this issue.

I have tested this in other languages but only get this error with C#; am I missing something?

Version

18A

Code Block

Uploading Files with Connect PHP (2 Comments)

$
0
0

Topic by Hanna Abi Akl

Content

Dears,

We have a scenario whereby we are writing custom APIs using Connect PHP. Part of the requirement is being able to create new incidents with attachments that should be uploaded through a custom web interface (different from our customer portal).

We've looked at the sample codes for incident file attachments and file uploading on RN (mainly through custom widget on the portal) but they do not meet our needs.

We need some help figuring out how to upload files and attach them to incidents without them coming from an <input> widget from the portal.

Is there a way to achieve this? Any kind of guideline would be very much appreciated.

Thanks,

Hanna

Version

Connect version 1.3

Authenticating external application using Service Cloud as the identity provider (5 Comments)

$
0
0

Topic by Roger Beggs

Content

I am trying to authenticate using single sign-on by sending this SAML request to Service Cloud:

POST /cgi-bin/rnowgse00137.cfg/php/sso/saml2/idp/post/login.php HTTP/1.1
Host: {sc-host}
Origin: {app-host}
Content-Type: application/x-www-form-urlencoded
Content-Length: nnn

SAMLRequest={saml}&RelayState=some_token

where {saml} is a base64 encoding of this request:

<samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
  xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
  ID="_8dcc6985f6d9f385f0bbd4562ef848ef3ae78d87d7" Version="2.0"
  IssueInstant="2018-03-10T15:26:20Z"
  AssertionConsumerServiceURL="https://{app-host}/assertion"
  ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
  Destination="http://{sc-host}/cgi-bin/rnowgse00137.cfg/php/sso/saml2/idp/post/login.php">
  <saml:Issuer>{app-host}</saml:Issuer>
</samlp:AuthnRequest>

But it always returns an HTTP 400 (Bad Request) error with no other information.
Is there something wrong with this request, and how do I know what it is?  Are there any logs that a user can access?

I have validated the request with a third-party tool and tried various other sample requests that I found on the Internet.  Are there any examples of a request that Service Cloud considers valid?

Does it have to have a certificate?  If so, is there a way I can turn this off for initial testing?

Any help much appreciated.

Version

Service Cloud August 2017
Viewing all 2504 articles
Browse latest View live


Latest Images