Have to send users (in xml format) to intercom by using Intercom API

One Star

Have to send users (in xml format) to intercom by using Intercom API

Hey,
I  have one challenge that i have to send my users list to intercom by using API of user, authentication and tags.
So, client told me that you should try to send users by tRest component instead of any java code.
I have my intercom API id and key also.
I tried to send users by using component tfixedflowinput -> txmlmap ->tRestClient with URL of ("https://api.intercom.io/bulk/users"), So i have status OK but have response code 200 and not sending users at intercom and as per this response code client told me that - 
you are using bulk api, which you shouldn't.
the fact you use txmlmap means nothing with mandatory have to use bulk api
but the bulk api is in beta, not supported yet,so you can't relay on it, even for support. you must work agent per agent not bulk of agents.
So please suggest me that what i should do?
Thanks in advance and revert me as soon as possible.
One Star

Re: Have to send users (in xml format) to intercom by using Intercom API

Hey,
I need quick suggestion can any body help me at this?
Community Manager

Re: Have to send users (in xml format) to intercom by using Intercom API

Hi 
Response code 200 means the calling is OK, I don't understand "You must work agent per agent not bulk of agents", you just need to send one user at a time? If so, set 'All in one' as false on tXMLMap, it will generate different request and call the webservice for each user.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Have to send users (in xml format) to intercom by using Intercom API

Hi,
If response code is correct so why users are not sending at intercom?
Thanks.
Community Manager

Re: Have to send users (in xml format) to intercom by using Intercom API

Hi
In the advanced settings of tRestClient, check the 'log message' box to print the log message on the console to see if the request payload is passed correctly to the server? If not, what are your expected data?
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Have to send users (in xml format) to intercom by using Intercom API

I have this output -
Starting job Intermediate at 05:12 28/10/2015.
connecting to socket on port 3616
connected
Intermediate: job started @ 2015-10-28 05:12:35
: org.apache.cxf.interceptor.LoggingOutInterceptor - Outbound Message
---------------------------
ID: 1
Address:
Http-Method: POST
Content-Type: application/json
Headers: {Content-Type=, Accept=, Authorization=}
Payload: {"items":{"user_id":"swati1036","email":"w@serenity.io","name":"Serenity Washburne","signed_up_at":1392731325,"last_seen_ip":"1.2.3.6","last_seen_user_agent":"Mozilla\/5.0(Macintosh; Intel Mac OS X 10.9"}}
--------------------------------------
: org.apache.cxf.interceptor.LoggingInInterceptor - Inbound Message
----------------------------
ID: 1
Response-Code: 200
Encoding: UTF-8
Content-Type: application/json; charset=utf-8
Headers: {Cache-Control=, connection=, content-type=, Date=, ETag=, Server=, Status=, Strict-Transport-Security=, transfer-encoding=, Vary=, X-Content-Type-Options=, X-Frame-Options=, X-Intercom-Version=, X-Intercomrade=, X-RateLimit-Limit=, X-RateLimit-Remaining=, X-RateLimit-Reset=, X-Request-Id=, X-Runtime=, X-XSS-Protection=}
Payload: {"app_id":"p4lt44zd","id":"job_5550ed88_7d43_11e5_8e05_2763372fe5b5","created_at":1446016385,"completed_at":null,"closing_at":1446017285,"updated_at":1446016385,"name":"api_bulk_job","state":"running","links":{"error":"","self":""}}
--------------------------------------
statusCode: 200|body: |string: {"app_id":"p4lt44zd","id":"job_5550ed88_7d43_11e5_8e05_2763372fe5b5","created_at":1446016385,"completed_at":null,"closing_at":1446017285,"updated_at":1446016385,"name":"api_bulk_job","state":"running","links":{"error":"","self":""}}
Intermediate: finished.
Intermediate: job finished @ 2015-10-28 05:12:40
disconnected
Job Intermediate ended at 05:12 28/10/2015.
One Star

Re: Have to send users (in xml format) to intercom by using Intercom API

I sent json data with authorization key to intercom by using chrome Advanced Rest Client.
It is working fine but not able to send users by Talend (tRest and tRestClient) both.
Please suggest as per given output.
Thanks in advance.