• Anant Agarwal 15
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 4
    Replies
Hi All,

I am trying to access the omnichannel status in the softphone that is using the open CTI API. 

I am using the custom Lightning application that is being referred in the call center configuration. Since Salesforce opens the softphone in the iframe in actual DOM, it seems due to the lightning it is not able to access the omnichannel status using the javascript toolkit.

If anyone has implemented the same, please help with the solution.

 
Hi All,

The WSDL I am generating through WSDL2Apex does not include the necessary SOAP Headers. Is there anyway to modify the generated apex code to include the SOAP Header properties? If so, how do I do that? I see the inputHttpHeaders__x but I am looking for the equivalent for SOAP Headers (if they exist)? 
If I am making a callout without header then I am getting the Error : "Wrong UserSessionID    : ORA-20103: no such user session id; ORA-06512: at -GCONF_NGE.CHECK_USER_SESSION_ID-" which is obvious as i am not authenticating first.

I need to set header in the given fromat: 

<soapenv:Header>
<wlm:Security xmlns:wlm= " http://schemas.xmlsoap.org/ws/2002/04/secext " >
<wlm:Authentication wlm:login= " test” wlm:password= " test”/>
</wlm:Security>
</soapenv:Header>

Don't know how to set this header in the SOAP Request. 

Here is my generated code that i need to call:
public String WSExpCreateHousehold(String param0) {
            wsMmFr.WSExpCreateHousehold_element request_x = new wsMmFr.WSExpCreateHousehold_element();
            request_x.param0 = param0;
            wsMmFr.WSExpCreateHouseholdResponse_element response_x;
            Map<String, wsMmFr.WSExpCreateHouseholdResponse_element> response_map_x = new Map<String, wsMmFr.WSExpCreateHouseholdResponse_element>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              'urn:WSExpCreateHousehold',
              'http://ws.mm.fr',
              'WSExpCreateHousehold',
              'http://ws.mm.fr',
              'WSExpCreateHouseholdResponse',
              'wsMmFr.WSExpCreateHouseholdResponse_element'}
            );
            response_x = response_map_x.get('response_x');
            return response_x.return_x;
        }

 
I have an idea that we can use getdescribeField method of schema class and arranging it in map through getMap() method but not sure how ll it be actually implemented.

Thanks in Advance!
Hello Reader

I  have a Custom object  (called API_Order__c) which has  lookup  field to Account
My plan is  to insert  MULTIPLE  records  in 1  REST API call and I am trying to build  the good JSON
I am not able to do this. I tried  the stanbdard REST  and I tried  to  use the COmposite/tree  REST

Seee below what I havew tried:

TEST 1

I want to  create  1 record  using REST command AND I want to reference the Account with External ID.
I use the below  REST
Method: POST
URL: /services/data/v39.0/sobjects/API_Order__c/

{
  "SourceFile__c" : "DE_1A_MSV3",
  "Order_Date__c" : "2017-07-07",
  "Account__r" : 
         {
         "External_ID_vod__c":"WDEF01663170"
         },
  "Account_Name__c" : "Adler-Apotheke",
  "NumberOfExpectedItemLines__c" : "2", 
  "External_Id__c" : "API_O_1003"
}

this is WORKING

​TEST 2
BUT  if I want to insert  MULTIPLE  records  I do not  know  what is  the right syntax


[
{
  "SourceFile__c" : "Value 1",
  "Order_Date__c" : "2017-07-07",
  "Account__r" : 
         {
         "External_ID_vod__c":"XXXX"
         },
  "External_Id__c" : "API_O_1003"
},
{
  "SourceFile__c" : "Value 2",
  "Order_Date__c" : "2017-07-08",
  "Account__r" : 
         {
         "External_ID_vod__c":"YYYY"
         },
  "External_Id__c" : "API_O_1003"
}
]

I god  JSON parsng ERROR

TEST 3

I tried to use  the COMPOSITE  REST  call  to insert Multiple records and if I am passing the Salesforce ID  of  the  Account lookup is OK 

POST
/services/data/v39.0/composite/tree/API_Order__c

{
"records" :[
  {
  "attributes" : {"type" : "API_Order__c", "referenceId" : "ref1"},
  "SourceFile__c" : "DE_1A_MSV3",
  "Order_Date__c" : "2017-07-07",
  "Account__c" : "0015E000004jH2I"
  }, 
  {
  "attributes" : {"type" : "API_Order__c", "referenceId" : "ref2"},
  "SourceFile__c" : "Val2",
  "Order_Date__c" : "2017-07-07",
  "Account__c" : "0015E000004jH2I"
   }]
}

TEST 4
BUT IF  I TRY  TO REFERENC ETHE ACCOUNT WITH EXTER NAL ID  I FAIL

POST
/services/data/v39.0/composite/tree/API_Order__c

{
"records" :[
  {
  "attributes" : {"type" : "API_Order__c", "referenceId" : "ref1"},
  "SourceFile__c" : "DE_1A_MSV3",
  "Order_Date__c" : "2017-07-07",
  "Account__r" : 
         {
         "External_ID_vod__c":"WDEF01663170"
         },
  "Account_Name__c" : "Adler-Apotheke",
  "NumberOfExpectedItemLines__c" : "2", 
  "External_Id__c" : "API_O_1001"
  },
  {
  "attributes" : {"type" : "API_Order__c", "referenceId" : "ref2"},
  "SourceFile__c" : "DE_1A_MSV3",
  "Order_Date__c" : "2017-07-07",
  "Account__r" : 
         {
         "External_ID_vod__c":"WDEF01663170"
         },
  "Account_Name__c" : "Adler-Apotheke",
  "NumberOfExpectedItemLines__c" : "2",
  "External_Id__c" : "API_O_1002"
   }]
}

I have the ERROR  message: Cannot reference a foreign key field Account__r.


Any help?  

Thanks in advance Csaba
Hi All,

The WSDL I am generating through WSDL2Apex does not include the necessary SOAP Headers. Is there anyway to modify the generated apex code to include the SOAP Header properties? If so, how do I do that? I see the inputHttpHeaders__x but I am looking for the equivalent for SOAP Headers (if they exist)? 
If I am making a callout without header then I am getting the Error : "Wrong UserSessionID    : ORA-20103: no such user session id; ORA-06512: at -GCONF_NGE.CHECK_USER_SESSION_ID-" which is obvious as i am not authenticating first.

I need to set header in the given fromat: 

<soapenv:Header>
<wlm:Security xmlns:wlm= " http://schemas.xmlsoap.org/ws/2002/04/secext " >
<wlm:Authentication wlm:login= " test” wlm:password= " test”/>
</wlm:Security>
</soapenv:Header>

Don't know how to set this header in the SOAP Request. 

Here is my generated code that i need to call:
public String WSExpCreateHousehold(String param0) {
            wsMmFr.WSExpCreateHousehold_element request_x = new wsMmFr.WSExpCreateHousehold_element();
            request_x.param0 = param0;
            wsMmFr.WSExpCreateHouseholdResponse_element response_x;
            Map<String, wsMmFr.WSExpCreateHouseholdResponse_element> response_map_x = new Map<String, wsMmFr.WSExpCreateHouseholdResponse_element>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              'urn:WSExpCreateHousehold',
              'http://ws.mm.fr',
              'WSExpCreateHousehold',
              'http://ws.mm.fr',
              'WSExpCreateHouseholdResponse',
              'wsMmFr.WSExpCreateHouseholdResponse_element'}
            );
            response_x = response_map_x.get('response_x');
            return response_x.return_x;
        }

 
Hi All,
currently i am in a evaluation process of connecting Voice/ACD with the new SFDC Omni-Channel feature. 

The ACD provider will be integrated using OpenCTI. Indeed OpenCTI exists in the CallCenter console component of the ServiceConsole. Usually the ACD provider takes care of the call routing and the only interaction with SFDC is done in context of the OpentCTI HTML/JavaScript code (inbound and outbound calls, call logging etc.). This HTML/JavaScript code is always running in context of the browser of a particular agent. The session between the agent and the ACD server is handled by the CallCenter console component (pure Cloud solution) or some kind of local desktop app as a middleware between the CallCenter console component and the ACD server.

I have an ongoing discussion with SFDC about there recommendation to integrate OpenCTI with Omni-Channel to make sure the Omni-Mechanism will manage the Agent-Blending completely on SFDC side.

SFDC suggest to let the ACD system create a Case … which will be handled by a Omni-Service channel. A Omni routing configuration assigned to a queue will route that case to an agent. As soon as an agent picks that case from the Omni console component the ACD is notified via SFDC streaming API to connect the pending call with the agent who accepted the case. In fact the ACD server is the only subscriber of the StreamingAPI PushTopic.

I have a fundamental problem to understand that approach:
1. from my understanding OpenCTI only runs in context of a client browser … to create a case outside that context, OpenCTI needs to connect to SFDC in a different way. That was the old CTI way … OpenCTI tries to get rid of that!

2. StreamingAPI cannot connect to server side processed outside of SFDC (like a server run by a ACD provider), again: the only way is to notify the OpenCTI console component via Javascript events fired by service console integration toolkit. 

Does anyone ever did such an implementation or found any kind of best practice documents coming from SFDC?

Before you ask: we have a running ServiceCloud implementation (1000+ agents) using OpenCTI in the „classic way“ for a couple of years now. Moreover we have a new PoC using Omni-Channel for Email,Web and LiveAgent in place. The missing piece is to connect OpenCTI and Omni and let Omni do the call routing instead of the ACD provider.

Thanks for any kind of inspiration 

Best,
Andreas