cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
11479
Views
0
Helpful
22
Replies

Registration Callback URL fails

Frederic Doyle
Cisco Employee
Cisco Employee

 

I have run the following code :

 

 

// Registration Process to create registration URL

 

       RegisteringApplication registerApp = ConnectorFactory.getConnector(RegisteringApplication.class);

 

       System.out.println( "Generating Registration URL:" );

 

       try{

 

           String productCallbackUrl = "http://fake";

 

           String APPLICATION_TYPE = "custom";

 

           String registrationURL = registerApp.createRegistrationRequest(productCallbackUrl, APPLICATION_TYPE);

 

System.out.println("Open the following URL in a browser to complete the registration request.");

 

           System.out.println(registrationURL);

 

       }

 

       catch (Exception e) {

 

           System.out.println("Error Creating Registration Request! The Error is: " + e);

 

       }

It returnes me this URL : https://ccfs.ciscoccservice.com/v1/authorize?callbackUrl=http%3A%2F%2Ffake&appType=custom

 

I use this URL in a browser and I can this error message : 502 Bad Gateway: Registered endpoint failed to handle the request. 

 

Any Idea what I’m doing wrong?  I’m supposed to get the login interface..

 

 

Thanks,

 

 

Fred

 

22 Replies 22

Hi Wade,

yes I have look at that site end use it to ajust the code from here :

https://context-service-downloads.rciad.ciscoccservice.com/samples/importexport/


I'm using Import.java example.  My customer wants to load customer in batch and my understanding is that we can accomplish that with that program.  That's why I was asking for .json simple since I'm not clear on the expected structure.


{"Id" : "1", "Name": "Fred Doyle","Mobile": "5148985786","Home": "5146202905"}         (this is a line inside customer.json )


I just added one line in the file to test but it doesn't work.  I understand now that it's expecting an array.


My other question is regarding the association between request, client and pod. I dont understand the magic that allows the pod to be associated to the right customer and request.


thanks for your help


Fred



Hi Fred,

As far as relationship among pod, customer and request are concerned, they all can exist standalone. However, in most cases, a pod is associated with a customer (when pod's customerId attribute is not null). For the same customer, it can associate with a set of pods and each pod represents an activity (a phone call, a chat session, an email or a social media action, such as a Facebook post). So when a call center agent handles an activity (e.g. a call) if the customer associated is found, the customer's activity history (all pods with the same customerId) can be viewed by agent. Of course, if customer never provides its information (say an anonymous call) the pod created will not have customer associated. Currently in our Finesse gadget, if a call has no associated customer, our javascript SDK allows agent to create a customer and updates the pod so it will associate it.

A request is another way to group pods. For example, one customer needs help from his insurance to deal with 2 issues of different category (a car accident and a house damage claim), although it is the same customer and multiple calls, emails and chats for each issue, it will be more logical to put all car accidents activities (pods) under one request and all other pods under a different request.

Hope this helps,

Wade

Fred,

Our CC product manager Vikram Chhabra <vchhabra@cisco.com> will respond to your question regarding the use of import/export app for a batch operation of creating customers.

It seems that you are now able to start your app and be able to connect to context-service without error. Can you confirm? So I can resolve this issue. At the same time, please continue to raise issues, provide feedbacks or ask questions regarding context-service,  we will try our best to respond and help.   

I still get this error :

2016-06-06 13:58:43 INFO  KmsSecureChannel:544 - Established KMS ephemeral key (/ecdhe/ede386ff-bc49-473d-b36a-654038967654) for device 7eec6e04-5962-4cac-a6a2-3641d4683fe1

2016-06-06 13:58:43 INFO  KmsManager:322 - Successfully loaded the hashing salt from key https://encryption-a.wbx2.com/encryption/api/v1/keys/ac9a1fcb-e323-4249-91fe-d9b390784493

2016-06-06 13:58:43 INFO  RESTClient:1133 - Error on GET: https://management.rciad.ciscoccservice.com/management/property/v1/user/propertyName/workgroup.lab.scr.encryption.latest.key.org.2ed8ba59-6479-4a14-89a6-8e8b226db46c

2016-06-06 13:58:43 INFO  KmsManager:357 - Did not find a pre-existing kms key in the property table.

ApiError with errorType: notFound, errorData: propertyName, errorMessage: Object not found. Key: workgroup.lab.scr.encryption.latest.key.org.2ed8ba59-6479-4a14-89a6-8e8b226db46c

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

    at java.lang.reflect.Constructor.newInstance(Unknown Source)

    at com.cisco.thunderhead.errors.ApiExceptionFactory.getApiException(ApiExceptionFactory.java:78)

    at com.cisco.thunderhead.errors.ApiExceptionFactory.generateApiException(ApiExceptionFactory.java:113)

    at com.cisco.thunderhead.errors.ApiExceptionFactory.generateApiException(ApiExceptionFactory.java:95)

    at com.cisco.thunderhead.RESTClient.generateUriApiException(RESTClient.java:1019)

    at com.cisco.thunderhead.RESTClient.handleErrors(RESTClient.java:994)

    at com.cisco.thunderhead.RESTClient.get(RESTClient.java:334)

    at com.cisco.thunderhead.RESTClient.get(RESTClient.java:224)

    at com.cisco.thunderhead.RESTClient.get(RESTClient.java:211)

    at com.cisco.thunderhead.kms.KmsManager.checkForLatestValidKey(KmsManager.java:345)

    at com.cisco.thunderhead.kms.KmsManager.rotateKMSEncryptionKey(KmsManager.java:403)

    at com.cisco.thunderhead.kms.KmsManager.tryInitialize(KmsManager.java:290)

    at com.cisco.thunderhead.kms.KmsManager$InitializeCache.run(KmsManager.java:272)

    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

    at java.util.concurrent.FutureTask.run(Unknown Source)

    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)

    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

    at java.lang.Thread.run(Unknown Source)

2016-06-06 13:58:43 INFO  KmsManager:435 - Successfully generated and bound a new SCR encryption key /encryption/api/v1/keys/3c58be27-013a-4379-9823-742acff50303 to workgroup resource https://encryption-a.wbx2.com/encryption/api/v1/resources/adf6d4c3-1ce1-4b20-b19a-0166001a403e

2016-06-06 13:58:43 INFO  ContextServiceClientImpl:180 - **** Context Service Client Initialization Complete. ****

I team,

good news team. it work, Vikram gave me an example for the .json batch file and it's working.

I still have a error that is thrown but it look like it doesnt affect the execution of the code.

I have added my first customer in the cloud ... hurray!!!

thanks for all your support, you are fantastic and very responsive

now I will start to play a bit with the code.

Fred

Fred,

The error you mentioned is a harmless INFO log statement ("Did not find a pre-existing kms key in the property table."),  context-service then created one and stored it in db. See the newer log statement ("INFO  KmsManager:322 - Successfully loaded the hashing salt from key https://encryption-a.wbx2.com/encryption/api/v1/keys/ac9a1fcb-e323-4249-91fe-d9b390784493")


Also make sure that when you use ConnectionData, the workgroup should be in sync ("lab" or "production"). ie. you cannot get a pod created by "production" workgroup by using "lab" workgroup's connectionData. 

Fred,

The Import/Export sample code was written to work with our SDK 2.0 which hasn't been published yet (due soon). That said, a simple import should work with SDK 1.0 too. Give it a try without any modification to the sample code. Try use this this JSON with it and let us know the result.


Add this customer to a customer.json file

[

   {

      "fieldsets":[

         "cisco.base.customer"

      ],

      "dataElements":[

         {

            "keyValuePair":{

               "left":"Context_First_Name",

               "right":"Jane"

            },

            "type":"string"

         },

         {

            "keyValuePair":{

               "left":"Context_Last_Name",

               "right":"Doe"

            },

            "type":"string"

         },

         {

            "keyValuePair":{

               "left":"Context_Mobile_Phone",

               "right":"555-555-5556"

            },

            "type":"string"

         },

         {

            "keyValuePair":{

               "left":"Context_Work_Email",

               "right":"jane@doe.com0.6955042307984233"

            },

            "type":"string"

         }

      ],

      "id":"76066410-1841-11e6-9d55-f38512983078"

   }

]


Add this POD to your POD.JSON file

[

   {

      "customerId":"76066410-1841-11e6-9d55-f38512983078",

      "tags":[

         {

            "name":"mytag"

         }

      ],

      "state":"active",

      "fieldsets":[

         "cisco.base.pod"

      ],

      "dataElements":[

         {

            "keyValuePair":{

               "left":"Context_Notes",

               "right":"Really short note"

            },

            "type":"string"

         },

         {

            "keyValuePair":{

               "left":"Context_POD_Activity_Link",

               "right":"mylink"

            },

            "type":"string"

         },

         {

            "keyValuePair":{

               "left":"Context_POD_Source_Phone",

               "right":"555-555-5555"

            },

            "type":"string"

         }

      ]

   }

]



Hi, i have the same problem but with context-service-sample-code application, when i click the registration button the page returns internal server error.

 

Anyone knows what happed with this url?, i see that the registration button invoke  https://ccfs.ciscoccservice.com/v1/authorize?callbackUrl ......