cancel
Showing results for 
Search instead for 
Did you mean: 

Twitter integration with SAP CRM

former_member201354
Participant
0 Kudos

Hi All,

This discussion is regarding twitter integration with SAP CRM for which I followed the snote :1832480 "How to implement Twitter API for CRM Interaction Center". After doing all the steps still not able to integrate with SAP CRM.

Below are the doubts/problems that I have regarding twitter integration.

     1) Is there any background job program by which data's are fetched from twitter based on tokens?

     2) How will the implemented class methods are executed as we are not specifying which method to execute based on button click or event?

     3) When I  execute my implemented class 'get_post' method its giving the below error. Could anyone suggest the cause of this issue?

Note : I have imported SSL for twitter using STRUST.

Thanks in Advance.

Regards,

Bob.

Accepted Solutions (1)

Accepted Solutions (1)

former_member201354
Participant
0 Kudos

Hi Sujitha,

Can you check the below code if same ignore.

CALL METHOD cl_http_client=>create_by_url

       EXPORTING

         url                = lv_url_get_post

*        proxy_host         = gv_proxy_host

*        proxy_service      = gv_proxy_service

         ssl_id             = 'ANONYM'

         sap_username       = ''

         sap_client         = ''

       IMPORTING

         client             = lo_twt_http_client

       EXCEPTIONS

         argument_not_found = 1

         plugin_not_active  = 2

         internal_error     = 3

         OTHERS             = 4.


Regards,

Bob.

Former Member
0 Kudos

Hi Bob,

HTTPS service is enabled in the SAP System.

and also, i have changed the code as mentioned by u above.

I have separately debugged GET_POST method, attached is the error that i am getting.

Everything is same as you have mentioned till now. Please help.

Regards,

Sujitha

former_member201354
Participant
0 Kudos

Hi Sujitha,

Have you maintained "ANONYM" in SSL Client Identities of system?

The same is being used in the "CALL METHOD cl_http_client=>create_by_url ssl_id             = 'ANONYM' ".

Regards,

Bob Issac Varghese.

Former Member
0 Kudos



  Hi Bob,

This is the SSL certificate that is being installed in SAP system and i got it from Basis team.

The ID( SSL_ID) should be of subject which is mentioned in the screenshot. 
 
  
 
 


Regards,

Sujitha


former_member201354
Participant
0 Kudos

Hi Sujitha,

In STRUST go to Environment->SSLclient Identities and check if 'ANONYM' is present.

Have you maintained proxy settings in SICF?

Regards,

Bob Issac Varghese.

Former Member
0 Kudos

Hi,

It is being confirmed by basis team that ANONYM is already present. in SICF, nothing is being maintained. i have attached screenshot of SICF.

former_member201354
Participant
0 Kudos

Hi Sujitha,

Okay then can you maintain the HTTPS proxy details i.e.hostname , port and logon details also.

This should workout i guess.

Hopefully u have commented the proxy variables used in class.

Regards,

Bob.

"If the above solution is right please select it as right answer"

Former Member
0 Kudos

Hi Bob,

Sorry to disturb you again. I have a doubt here when maintaining the logon details . What login credentials i have to give. Is it the same that we use to login to SAP system or LAN credentials.

The proxy variables are commented out in the z-class.

Regards,

sujitha

former_member201354
Participant
0 Kudos

Hi sujitha,


The username & password which you use internet from you,re company network.

Ex. Wen accessing google it might ask for username if in proxy network.


Regards,

Bob.

Former Member
0 Kudos

Hi Bob,

I have done the integration to twitter. Now i can able to send messages from twitter to SAP CRM and vice-versa.

Really i thank you for helping me in each perspective. Thank you so much

Regards,

Sujitha.S

former_member201354
Participant
0 Kudos

Hi Sujitha,

It would also be helpful if you could specify the correct answer and helpful answer due to which u were able to solve the problem because it can also help other people to solve the problem if they face the same issue.

Regards,

Bob.

Former Member
0 Kudos

Hi Bob,

Yeah sure. This is the bewlow step that i have followed.

In SICF transaction goto --> Client--> Proxy Setting-->HTTPS log --> provide the LAN network proxy details and its credentials.

By this, I can able to do integration with SAP CRM .

Regards,


Sujitha.S

Former Member
0 Kudos

Hi Bob,

I have one more question here. Please help.

In Interaction Screen in Webui,

Once the post is retrieved , we can able to see its details . There in User details section we have Retrieve User Details , When i click on this button, i can able to see a success message that User Details Retrieved but i am not able to see it.

Could you please tell me where i can able to see this.

This is the screenshot attached.

Answers (4)

Answers (4)

0 Kudos

Hi Bob,

I am facing the same error as you are originally in your post.

I have followed the same steps as per your blog linked in the above discussion, and the SSL certificate is also uploaded in Strust.

Can you please tell how did you solve the above issue?

Regards,

Paresh

former_member201354
Participant
0 Kudos

Hi Paresh,

Check the proxy setting in SICF.

Follow below step.

In SICF transaction goto --> Client--> Proxy Setting-->HTTPS log --> provide the LAN network proxy details and its credentials.


Regards,

Bob .

0 Kudos

Hi Bob,

Thank you for your reply!

I believe that we need to provide these proxy details when we are using the Proxy details in the Method " cl_http_client=>create_by_url", to fetch any data from twitter.

But i have a concern, as i have already installed the required SSL encryption certificate "VeriSign Root Certificates G5 Class3", is it still required to used the attributes 'GV_PROXY_HOST' and GV_PROXY_PORT'?

I just cleared these constant attributes from the Z class created for twitter handle and now i am getting a 401 Authorization Required error.

Can you please confirm if the proxy would still be needed along with the SSL Certificate or is there something else which i am missing?

Thanks.

Regards,

Paresh

0 Kudos

Hi Bob,

I am also trying to follow this process, but I am unable to retrieve the posts from Facebook page.

I have followed all the steps provided in notes 1832462, 1859791.

According to step 7 in note 1859791 they have said that we have to schedule a program in the background. Is this program a standard program? If yes, could you provide me the name. If not, do we have to write our own Z program to retrieve the posts.

Also, if you could share any step wise document to integrate Facebook with CRM it will be really helpful.

Thanks and Regards,

Saurabh Jog

former_member201354
Participant
0 Kudos

Hi Sujitha,

Just check the z-class u might need to code as standard SAP code doesn't have that feature.

Regards,

Bob

Former Member
0 Kudos

Hi Bob,

Could you please help me on Sentiment analysis. We dont have HANA text analysis engine. So, is it required to install other external engine. Could you please guide me on  this.

Regards,

Sujitha.S

former_member201354
Participant
0 Kudos

Hi  Sujitha,

For Sentiment analysis there has to be HANA text analysis engine which can help in retrieving the sentiment of the post. As such BAdi is available for calculating the sentiment even without hana. I haven't tried this part . There are lot of open source sentiment analysis api available. You can try that part via web services( Can't give surety ) or you can take an example of  SAP code which is available in the z-class (cl_http_client=>create_by_url).

Good that you are trying this part which i didn't get chance to explore .

Note: If you are successful with it please do share .

Regards,

Bob.

Former Member
0 Kudos

Hi Bob,

I am trying this sentiment analysis and will surely share you..

Meanwhile could you please help me on the below question?

How we can able to trigger subsequent transaction from inbound post ? ( ie the tweets which we received in Agent inbox . )

Regards,

Sujitha.S

former_member201354
Participant
0 Kudos

Hi Sujitha,

Are you asking about replying to tweets from agent inbox?

This will automatically happen as per the class which is written.

Regards,

Bob.

Former Member
0 Kudos

Hi Bob,

That is happening automatically . I am asking about, how could we able to trigger a transaction, which we could able to chk it in crm_order_read API. Any idea onthis.

Is it possible to map inbound post with the transaction?

Regards,

Sujitha.

former_member201354
Participant
0 Kudos

Hi Sujitha,

Sorry for the delayed response.

Your question is that you want to execute a certain code before the inbound post is trigger?

Regards,

Bob.

Former Member
0 Kudos

Hi Bob,

We are also facing the same issue when trying to integrate Twitter in SAP CRM .

could you please share us your thoughts on these questions below:

     1) How will the implemented class methods are executed as we are not specifying which method to execute based on button click or event?

     2)) When I  execute my implemented class 'get_post' method its giving the below error. Could anyone suggest the cause of this issue?

    3) How to fill in the proxy authentication details in 'get_post' method ?

Thanks & Regards,

Sujitha.S

former_member201354
Participant
0 Kudos

Hi Sujitha,

Please refer to my below blog regarding twitter integration which i created after successfully implementing the integration with twitter from interaction center CRM.

Hope it solves you're problem.

Regards,

Bob.

Former Member
0 Kudos

Hi Bob,

Yeah, I have referred to the above and link and followed those steps only. But when i try to schedule a background job, it is throwing an error in GET_POST method of the zclass " PROXY AUTHENTICATION FAILED'.

I have downloaded the SSL certificates as well. Eventhough it is getting failed in the above method.

Could you please let me know how could i solve this ?

Regards,

Sujitha

former_member201354
Participant
0 Kudos

Hi Sujitha,

Have you mentioned proxy details( i.e. gv_proxy_host & gv_proxy_service ) in the z-class ?

Regards,

Bob.

Former Member
0 Kudos

Yes, I have given those attribute values. below is the trace the got from basis team.

[Thr 140311989856000] *** ERROR =>
IcmConnInitClientSSL: Proxy connection to api.twitter.com:443 failed (407
{00010016} [icxxconn.c 1846]

It is failing at authorization level. for that i have called authenticate method in get_post as well and bypassed the authorization details. Even after that also, it throws  the same error.

Could you please share me the zclass and background job program name which you used if you can.

Please share it to my mail id  . My mail id is sujitha.sukumaran@techmahindra.com

Regards,

Sujitha.S

former_member201354
Participant
0 Kudos

Hi Sujitha,

If SSL certificate of twitter is present in system then there is no need to specify the proxy details( i.e. gv_proxy_host & gv_proxy_service  default value ) as mentioned in the snote's.Can you try this part and check.It should work.

Regards,

Bob.

Former Member
0 Kudos

Hi Bob,

I tired everything as mentioned in the note and ur blog for integrating twitter . But the error i am getting is in ICM as proxy connection failed to interact with twitter.

IcmConnInitClientSSL: Proxy connection to api.twitter.com:443 failed (407

{00010016} [icxxconn.c 1846]

If filling with proxy details , now i have a doubt like whether to fill the LAN Proxy address or SAP system HOST and port address.

Could you please try to share me the zclass (twitter client class) if you have created to my mail id. It would be great help for me. please

Regards,

Sujitha

former_member201354
Participant
0 Kudos

Hi Sujitha,

Don't mention the proxy details values in z-class (i.e. in the attribute of the z-class) and make sure the SSL twitter certificate that you used is the right one.

Did you try to debugging the z-class? if so can you tell me the location were its failing.

Note:Basis help is also required.

Regards,

Bob.

Former Member
0 Kudos

Hi Bob,

Now i debugged the z-class . In the method GET_Post , when getting response from social media, now it is getting failed.

Now, I tried by not mentioning the Proxy details in the attribute section.

* Get response.

    CALL METHOD lo_twt_http_client->receive

      EXCEPTIONS

        http_communication_failure = 1

        http_invalid_state         = 2

        http_processing_failed     = 3.



    IF sy-subrc <> 0.

      CALL METHOD lo_twt_http_client->get_last_error

        IMPORTING

          code    = lv_sysubrc

          message = ev_error_msg.

Now, in Ev_error_msg i got a message as "ICM_HTTP_CONNECTION_REFUSED".

SSL cretificates are imported correctly and its valid one.

Please let me know what should i correct here.

Regards,

Sujitha

former_member201354
Participant
0 Kudos

Hi Sujitha,

The connection is refused from SAP side so it might be a basis issue can you check with them.Its not able to communicate via ICM which it should.

Hope all the key of twitter account are rightly mentioned in z-class.

Regards,

Bob.

Former Member
0 Kudos

Hi Bob,

The key of the twitter account are correctly mentioned in Z-class and now  i have not mentioned the proxy details, so now i am getting the error in  receive method of GET_POST as "ICM_HTTP_CONNECTION_REFUSED".

Before by filling the proxy details in the attibute section got an error as Proxy authentication Required.

Could you please help me in solving this.

Regards,

Sujitha.S

Former Member
0 Kudos

Also,Please tell me what should BASIS team do . What they wanted to check in .

Former Member
0 Kudos

Hi Sujitha,

I've tested the GET_POST method and it retrieved the tweets successfully. I've scheduled a job to retrieve posts every hour. In the job I've implemented ABAP program. In that ABAP program I've create an instance of the Z-Class and call the GET_POST method. Now, the internal table have the tweets. What should I do to be displayed in the interaction center inbox of implemented role. Noting that, I've followed the instructions of the SAP Note, create channel which have the Z-class, account with main category social media,.........etc

If this approach is not accurate, please provide How did you schedule the background job step by step.

Thanks.