cancel
Showing results for 
Search instead for 
Did you mean: 

Schedule Get posts routine for Twitter posts for CRM intercation center

Former Member
0 Kudos

Hi Experts,

I've follow the SAP notes related to SAP CRM interface with social media APIs.

  • 1859791 CRM Social Media Integration in Interaction Center
  • 1832462 Master Note: How to Implement Social Media Channel API to Integrate with CRM Interaction Center
  • 1832480 How to implement twitter API for CRM Interaction Center

I've succeeded for every thing except the step of schedule background job. I've tested the GET_POST method and it's succeeded to retrieve tweets as desired. The following screen produce:

I've tried to schedule background job. I've created Z-Program. The program is as follow:

REPORT ZTWITTER_GET_POSTS.

DATA : CL_SOC_TW_CLIENT_TEST TYPE REF TO ZCL_SOC_TW_CLIENT_TEST.

CL_SOC_TW_CLIENT_TEST = NEW ZCL_SOC_TW_CLIENT_TEST( ).

CALL METHOD CL_SOC_TW_CLIENT_TEST->GET_POST( IV_SOC_POST_INFO = '').


The method GET_POST is executed successfully. The internal table have the tweets correctly.


What should I do to be in interaction center inbox as discussed in :


The program is executed every hour.


Actually, I don't know the detailed steps for scheduling such job. It's not stated clearly in note.


Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi Mohamed,

You can schedule the job in

SPRO -> CRM -> Basic Functions -> Social Media -> Basic Settings -> Schedule Background Job for Retrieving Social Media Posts

Give the job name, keep the job class as C, click on Start Condition, mention the abap program, the update uses the program: CRM_SOC_SMC_HARVEST_DU.

Click next and you can set the duration for immediate, hourly, daily, weekly etc and specify the time for the first run and schedule the job.

Once the first run has been scheduled, please go to transaction slg1 and use the Object 'crm_soc' to monitor/display the logs for the job run for social media, and if successful it must show the number of posts retrieved, otherwise the error encountered.

In case your tables are getting populated with posts retrieved by the job, you can put a break point in the Method CL_CRM_AUI_ADVQUERY_SERVICE =>GET_SMC_QUERY_RESULT and find the root cause of the problem by triggering the inbox search for the Main Category of the Social Media as defined in your configuration settings.