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

[Java] Retrieve OrganizationServiceSettings via SOAP

$
0
0

Topic by Michael Wigley

Content

I'm having a difficult time 'get'ing the OrganizationServiceSetting data.

I've done similar with getting the custom fields but when I get the populated object back, the OrganizationServiceSettings is always null and the tracking variable is set to false.
 
There must clearly be something I'm missing, any direction would be greatly appreciated. 

Version

Connect Web Services 18a

Code Block


Parsing XML in connect PHP received from external system (1 Comment)

$
0
0

Topic by Umer

Hi,

I have to parse and traverse through a xml document which I will be receiving from an external system. The external system will be sending data which will be converted into incident, attachments and tasks. The data structure will be like, each incident will be having one or more tasks. 

I am trying to get this document, after parsing and reading values out of xml tags I will be creating incident and incident tasks.

Is it a good way to do it in custom script/connect PHP? Or can I use OOTB SOAP webservice and expose it to external webservice?

Currently I am using below PHP code and it is giving me tags and their values:

$response= "
<Siebel>
<servicerequest>
<sr_num>
12345
</sr_num>
<problem>
test problem
</problem>
<email>
test@gmail.com
</email>
</servicerequest>
</Siebel>"; //file_get_contents('php://input');
 
        //Parsing incoming XML Message
        $p = xml_parser_create(); 
        //xml_parser_set_option( $p, XML_OPTION_CASE_FOLDING, 0 );
        //xml_parser_set_option( $p, XML_OPTION_SKIP_WHITE, 1 );
        xml_parse_into_struct( $p, $response, $index );
       // xml_parser_free( $p );
        
        $_GET= array();
        foreach ($index as $tag) 
{
            if($tag["type"]=="complete")
{
                $temparr = array($tag['tag'] => $tag['value']);
                $_GET = array_merge($_GET, $temparr);
echo $tag['tag'];
            }
        }

But I am not sure how will I traverse for the childs (tasks, attachments) of the incidents like below:

<Siebel>

               <servicerequest>

                              <sr_num>

                                             12345

                              </sr_num>

                              <problem>

                                             test problem

                              </problem>

                              <email>

                                             test@gmail.com

                              </email>

               <tasks>

                              <task1>

                                             <id>1/</id>

                                             <name>first task</<name>

                                             <description> this is first task </description>

                              </task1>

                              <task2>

                                             <id>2/</id>

                                             <name>2nd task</<name>

                                             <description> this is 2nd task </description>

                              </task2>                            

               </tasks>

               </servicerequest>

</Siebel>

 

[Java] Retrieve OrganizationServiceSettings via SOAP (1 Comment)

$
0
0

Topic by Michael Wigley

Content

I'm having a difficult time 'get'ing the OrganizationServiceSetting data.

I've done similar with getting the custom fields but when I get the populated object back, the OrganizationServiceSettings is always null and the tracking variable is set to false.
 
There must clearly be something I'm missing, any direction would be greatly appreciated. 

Version

Connect Web Services 17d

Code Block

Bulk delete in Contacts - Error

$
0
0

Topic by Priya Gopal

Hi All,

I am using bulk delete operation to delete contacts.But  we are getting an error "Delete not allowed on table: contact". The bulk delete option is enabled at profile level as well as we have permission to delete the contact. Any idea what could be the cause? Thanks in advance.

Regards, Priya

 

SOAP Examples - Multiple Filters

$
0
0

Topic by Pavel Franger

Content

Hi everyone,

I'm trying to do a multi filter SOAP request on a Report.

The SOAP below searches on three fields Keywords, Category & Product.

In my report i have this definition (also see image): 

answers.status_id in list Public AND (answers.search_fnl =  OR answers.map_prod_hie... = All OR answers.map_cat_hier... = All)

I'm not getting the same output as the Report i'm seeing in the system.

Am i doing the Filters right? Should all the filters be in the same tag <Filters></Filters> or separated like i have below?

I have tested each Filter on it's own and they are all correctly set.

 

Thank you in advance.

Code Block

Image

In Operator in ROQL (4 Comments)

$
0
0

Topic by chidambaram CT

Is it possible to use IN operator in ROQL?

I am trying some thing like this

Select C.ID from Contact C where C.UpdatedTime <= date_add(sysdate(), -90, 'DAY', 1) and C.ID in ( 41,42,43)

I am not getting the desired result.

How to use the Knowledge Foundation API (1 Comment)

$
0
0

Topic by Peeyush Sharma

Hi,

 I am just looking for an option of consuming KF API's to integrate with the external application.

Kindly suggest , As these are the web services. I was reading below document but could not understand , where to start with.

http://documentation.custhelp.com/euf/assets/devdocs/august2012/developer/Connect_KFAPI/Default_Left.htm

If anyone has any SOAP request , would be helpful or anykind of description if can provide.

Thanks,

Peeyush

INSERT DATA USING CONNECT PHP OR ROQL

$
0
0

Topic by shreesha

Content

Hi,

I have Custom Object with 4 fields including 1 Field is Organization relationship. How can i insert Record using from Customer Portal. 

I have created form in Customer portal. based on this Custom Object. As i know we have to insert using Controller Ajax. Is there any document related to this.

Object Fields:

1. ID
2. Transaction Date
3. Transaction Desc
4. Organization

Can anyone suggest me best approach to achieve this.

Thanks in Advance.

Version

November2016

Authenticating external application using Service Cloud as the identity provider (1 Comment)

$
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

Date Issue (4 Comments)

$
0
0

Topic by Muthulakshmi Muthaiah

Hi All,

I am trying to fetch the contact details based on the custom field date of birth value. But it is not working as expected and it shows the provided query has no results.

Please find the below query.

select id,Contact.CustomFields.CO.x_dob from Contact where id=1 and Contact.CustomFields.CO.x_dob like '1993-04-06Z' LIMIT 25

 

Thanks ,

Muthulakshmi

 

 

Last one month record in ROQL (3 Comments)

$
0
0

Topic by Muthulakshmi Muthaiah

HI All,

Could you please guide me how to get the last one month incidents in ROQL query.

Kindly give me some suggestions.

 

Thanks,

Muthu

Primary Contact with chaining variables

$
0
0

Topic by Beatriz Navarro

Hi,

I have the following code:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header>
      <ns7:ClientInfoHeader soapenv:mustUnderstand="0" xmlns:ns7="urn:messages.ws.rightnow.com/v1_4">
         <ns7:AppID>Basic Create</ns7:AppID>
      </ns7:ClientInfoHeader>
      <wsse:Security mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken>
            <wsse:Username>USER</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">PSW</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soapenv:Header>
   <soapenv:Body>
     <ns7:Batch xmlns:ns7="urn:messages.ws.rightnow.com/v1_4">
         <ns7:BatchRequestItem>
        <ns7:QueryCSVMsg xmlns:ns7="urn:messages.ws.rightnow.com/v1_4">
            <ns7:Query xsi:type="ChainSourceID" variableName="@idContato">SELECT ID AS '@idContato' FROM Contact WHERE Contact.CustomFields.c.matricula = '123';</ns7:Query>                      
        </ns7:QueryCSVMsg>
 </ns7:BatchRequestItem>
 <ns7:BatchRequestItem>     
          <ns7:CreateMsg xmlns:ns7="urn:messages.ws.rightnow.com/v1_4">        
         <ns7:RNObjects xsi:type="ns4:Incident" xmlns:ns4="urn:objects.ws.rightnow.com/v1_4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <!--Número da ordem-->
            <ns4:CustomFields xsi:type="ns2:GenericObject" xmlns:ns2="urn:generic.ws.rightnow.com/v1_4">
               <ns2:ObjectType>
                  <ns2:TypeName>IncidentCustomFields</ns2:TypeName>
               </ns2:ObjectType>
               <ns2:GenericFields dataType="OBJECT" name="c">
                  <ns2:DataValue>
                     <ns2:ObjectValue xsi:type="ns2:GenericObject">
                        <ns2:ObjectType>
                           <ns2:TypeName>IncidentCustomFields</ns2:TypeName>
                        </ns2:ObjectType>
                        <!--Descrição-->
                        <ns2:GenericFields dataType="STRING" name="descricao">
                           <ns2:DataValue>
                              <ns2:StringValue>Descrição!!</ns2:StringValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                        <ns2:GenericFields dataType="STRING" name="num_inventario">
                           <ns2:DataValue>
                              <ns2:StringValue>RI</ns2:StringValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                        <ns2:GenericFields dataType="STRING" name="centro_custo">
                           <ns2:DataValue>
                              <ns2:StringValue>1234</ns2:StringValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                        <!--Fornecedor-->
                        <ns2:GenericFields dataType="STRING" name="fornecedor">
                           <ns2:DataValue>
                              <ns2:StringValue>Nome do fornecedor</ns2:StringValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                        <!--Início desejado-->
                        <ns2:GenericFields name="inicio_desejado">
                           <ns2:DataValue>
                              <ns2:DateTimeValue>2019-01-08T15:53:44.000+00:00</ns2:DateTimeValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                        <!--Conclusão desejada-->
                        <ns2:GenericFields name="fim_desejado">
                           <ns2:DataValue>
                              <ns2:DateTimeValue>2019-01-08T15:53:44.000+00:00</ns2:DateTimeValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                        <!--Tipo do chamado-->
                        <ns2:GenericFields dataType="NAMED_ID" name="tipo_chamado">
                           <ns2:DataValue>
                              <ns2:NamedIDValue>
                                 <ns1:Name xmlns:ns1="urn:base.ws.rightnow.com/v1_4">Preventiva</ns1:Name>
                              </ns2:NamedIDValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                     </ns2:ObjectValue>
                  </ns2:DataValue>
               </ns2:GenericFields>
            </ns4:CustomFields>
            <!--Problema-->
            <ns4:Disposition>
               <!--<ID id="244" xmlns="urn:base.ws.rightnow.com/v1_4"/>-->
               <ns1:Name xmlns:ns1="urn:base.ws.rightnow.com/v1_4">AR CONDICIONADO PARADO</ns1:Name>
            </ns4:Disposition>
             <ns4:FileAttachments>
            <ns4:FileAttachmentList action="add">
                <ns4:Data>dGVzdGU=</ns4:Data>
                <ns4:FileName>test.txt</ns4:FileName>
            </ns4:FileAttachmentList>
     </ns4:FileAttachments>
            <!--Os dados do contato são obrigatórios-->
             <!--<ID id="@idContato" xsi:type='ns2:ChainDestinationID' xmlns="urn:base.ws.rightnow.com/v1_4"/>-->
           <ns4:PrimaryContact>
               <ns4:Contact >                         
    <ID  xsi:type='ChainDestinationID' xmlns="urn:base.ws.rightnow.com/v1_4"  variableName='@idContato' />    
               </ns4:Contact>
            </ns4:PrimaryContact> 

            <!--Categoria-->
            <ns4:Product>
               <!--<ID id="226" xmlns="urn:base.ws.rightnow.com/v1_4"/>-->
               <ns1:Name xmlns:ns1="urn:base.ws.rightnow.com/v1_4">ACJ-AR CONDICIONADO DE JANELA</ns1:Name>
            </ns4:Product>
            <!--Status-->
            <ns4:StatusWithType>
               <ns4:Status>
                  <!--<ID id="102" xmlns="urn:base.ws.rightnow.com/v1_4"/>-->
                  <ns1:Name xmlns:ns1="urn:base.ws.rightnow.com/v1_4">Aberto</ns1:Name>
               </ns4:Status>
            </ns4:StatusWithType>
         </ns7:RNObjects>
         <ns7:ProcessingOptions>
            <ns7:SuppressExternalEvents>false</ns7:SuppressExternalEvents>
            <ns7:SuppressRules>false</ns7:SuppressRules>
         </ns7:ProcessingOptions>
      </ns7:CreateMsg>
         </v1:BatchRequestItem>
      </v1:Batch>
   </soapenv:Body>
</soapenv:Envelope>

I'l like to search a ID contact with "matricula" custom field , insert inside a "idContato" variable , and user this variable as ID in Primary Contact to create a new Incident.

But this code doesn't work. The incident isn't created.

Can you suggest me where I'm going wrong?

Thanks!!

Beatriz.

Generate and download .xsd files from wsdl KF API (1 Comment)

$
0
0

Topic by Peeyush Sharma

Hi All,

Using SOAP UI , I am able to get the wsdl request and response but now I want to download or generate .xsd files from KF wsdl API's.

How can we do this?

 

Regards,

Peeyush Sharma

Setting Custom Object field to current date time (4 Comments)

$
0
0

Topic by David Wright

Content

Hi - I am creating a custom process, one function of which is to insert the current date time into a custom object field. I have tried various approaches to assign the value but cannot find the correct syntax. Can anyone help? Thank you. David 

Code Block

REST API Upload Attachment (4 Comments)

$
0
0

Topic by Sanjay Mehta

Content

Hi,

I am trying to upload an attachment on an existing incident using the sample code given on REST API http://docs.oracle.com/cloud/latest/servicecs_gs/CXSVC/c_Managing_file_attachments_aa1166814.html#aa1167719

Method: Post

URL: https://XXXXXXX.custhelp.com/services/rest/connect/v1.3/incidents/52371868/fileAttachments

Body: {
"fileName":" SampleFileAttachment.txt ",
"data":" c2FtcGxlIGNvbnRlbnQgZm9yIGZpbGUgYXR0YWNobWVudA=="
}

Status: Error

"detail": "Error attempting to create resource: File specified could not be found: /tmp/ c2FtcGxlIGNvbnRlbnQgZm9yIGZpbGUgYXR0YWNobWVudA==",

Can anyone please suggest?

Version

May 2016

Insert data in a custom objects with more than 50 columns (3 Comments)

$
0
0

Topic by Ruhul

Hi,

I need to upload data in a  custom objects which has more than 50 fields. I am trying to use Data Import Wizard but it's not allowing me to upload the .csv file as it has more than 50 columns. I am getting "The file has too many fields to be mapped".

It would be great if someone can help me. I think it can be done by using a custom scripts.

Thank you.

 

 

Where can I find .rn_Hidden CSS class? (1 Comment)

$
0
0

Topic by Ionut Petreus

Content

Hi.

In my mobile customer portal page I have an injected Css stylesheet that contains

 

I want to change the display: none !important to display: none and I can't find it.

I've search in the mobile/site.css widget/base.css and widgetCSs/myWidget.css and I could not find this rule.

Can anyone please help me?

Code Block

C# Report Returns Incorrect Data (8 Comments)

$
0
0

Topic by Andrew Wooster

Content

The report has a filter based on the date the chat was requested, this is set to "Between".  When I run the report in the console for "01/01/2017 12:00 AM" to "01/01/2017 12:30 AM" I don't get any results, which is what I expect.  When I run the same report in my program, it returns data.  Do I need to do anything extra when applying the filter?

Version

November 16

Code Block

How to use the Knowledge Foundation API (4 Comments)

$
0
0

Topic by Peeyush Sharma

Hi,

 I am just looking for an option of consuming KF API's to integrate with the external application.

Kindly suggest , As these are the web services. I was reading below document but could not understand , where to start with.

http://documentation.custhelp.com/euf/assets/devdocs/august2012/developer/Connect_KFAPI/Default_Left.htm

If anyone has any SOAP request , would be helpful or anykind of description if can provide.

Thanks,

Peeyush

Downloading a file attachment to a temp location via SOAP

$
0
0

Topic by Ian Oliver

Content

Hi All

Ok so we are trying to grab file attachments and then send them over web services into another API so its creates them on their side.  What we have works but it doesn't grab the attachment data as its not available of CPHP.

I believe we are going to have to use SOAP to actually download the file to a /tmp location and then send it from that file.

Does anyone have any examples for this ? we've been going through the documentation but cant find anything in there that helps.

We will be doing this from the custom scripts folder in file manager.

Thanks!

Ian

Version

17d
Viewing all 2504 articles
Browse latest View live