Jump to: navigation, search

Export Services to File by Date

POST /maintenance/services/files

Description

Your application can use this operation to export service data to the JSON or CSV file format for a given time range. You can filter the list of returned services according to their date, inner state, or events. The query creates a file per type of data exported (service, states, tasks), for instance:

  • "C:/export20140813_160508_183_services.csv"
  • "C:/export20140813_160508_183_states.csv"
  • "C:/export20140813_160508_183_tasks.csv"
Important
This operation includes the service data for each resources returned.

See also the export features page for further details about the state and event filters.

Operation

Export services to files
Method POST
URL /genesys/1/cs/maintenance/services/files
Name   Type   Mandatory Description
URI Parameters
time_from date/time[1] yes Filters the service IDs which match the event and/or state filters starting from the given date/time.

Example : 2014-09-02T08:00:00.000Z

time_to date/time[1] no Filters the service IDs which match the event and/or state filters ending to the given date/time.

By default, current time is taken as end range. Example : 2014-09-02T08:00:00.000Z

filter_events any, started, completed no Filters on either types of service event occurrence.
  • any (default): The response includes the services for which an event occurred in the given time range.
  • started: The response includes services for which a start event occurred during the given time range.
  • completed: The response includes services for which an end event occurred during the given time range.
filter_state any, active, inactive no
  • any (default): The response includes the conversation (or service information) if some event (specified by the filter_events parameter) occurred during the specified time range.
  • active: The response includes the conversation (or service information) if some event (specified by the filter_events parameter) occurred during the specified time range AND if the service is still active.
  • inactive: The response includes the conversation (or service information) if some event (specified by the filter_events parameter) occurred during the specified time range AND if the service is completed.
file_prefix String yes Specifies the file destination path and prefix. For example, if you set file_prefix to 'C:/export', the server generates the following one or three files:
  • "C:/export20140813_160508_183_services.csv"
  • "C:/export20140813_160508_183_states.csv"
  • "C:/export20140813_160508_183_tasks.csv"
compression String no Values:
  • uncompressed (default)
  • zip
  • gzip

If the compression is enabled, the server generates the export file with the accurate file extension.

separator String no Specifies the separator used in the exported CSV file to separate the column data in a CSV file line.
  • Default: ","
format json or csv no Specifies the format of the exported file. Default value is: csv.

<references />

Response

The Context Management Service API answers with HTTP codes for every request. The following table shows the correct response for a successful request. See HTTP Response Codes and Errors for further details on the possible codes that this operation can return.

Response
HTTP code 200
HTTP Title OK
Body String[]

Example

Operation
The following code sample associates the customer with a service, and specifies attached data as json arrays for "Feedback" and "Satisfaction".

POST http://localhost:8080/genesys/1/cs/maintenance/services/file?time_from=2014-07-22T12:00:00.000Z&time_to=2014-07-22T18:00:00.000Z&file_prefix=C:/export&format=csv

Response

202 Accepted

C:/export_20140902_125024_170_services.CSV file

377-fffa514f-75b4-45b8-a417-550337719328,9,111861477473,,true,692,3,7PH0C3M0MF,4,5VFB3U7F9F,3,689,5,OR7H63Q24D9940RH,2,2014-09-02T12:29:58.568Z,0723520428,2014-09-02T12:30:00.104Z,2,111861477473,9,3,689,8,tutu,8,true,2,Terranova mexico resort,4,false,8,Fancy resort Paris,2015-03-17
377-aa4abd74-db0e-4026-9adc-01fea18978b6,3,111639426401,,true,928,6,0F8ODRNFVO,7,PUCPBS2MCP,2,481,9,UYO5AV5G2KF3VEPS,8,2014-09-02T12:30:00.103Z,0528315290,2014-09-02T12:30:01.510Z,4,111639426401,4,10,481,6,tutu,8,true,2,Terranova mexico resort,4,false,8,Fancy resort Paris,2015-03-17
377-ee9920b1-32a6-4900-b8be-b3f7ed328a6d,1,112956879726,,true,713,1,KER4FXO89X,10,GNAYQTYRJA,2,256,7,Y61ED4QHTDK6AQ80,1,2014-09-02T12:29:58.511Z,1845768615,2014-09-02T12:30:00.072Z,3,112956879726,10,5,256,10,tutu,8,true,2,Terranova mexico resort,4,false,8,Fancy resort Paris,2015-03-17
service_id,service_type,contact_key,customer_id,started_anonymous,est_duration,disposition,disposition_desc,start_resource_type,start_session_id,start_media_type,start_resource_id,start_application_type,start_interaction_id,start_application_id,start_timestamp,end_session_id,end_timestamp,end_media_type,end_interaction_id,end_application_id,end_resource_type,end_resource_id,end_application_type,Satisfaction[0].gogo[0].titi,Satisfaction[0].pertinence,Satisfaction[0].usefull,Satisfaction[0].rating,Satisfaction[0].place,Satisfaction[1].pertinence,Satisfaction[1].usefull,Satisfaction[1].rating,Satisfaction[1].place,Meeting.MeetingDate

C:/export_20140902_125024_170_states.CSV file

377-ee9920b1-32a6-4900-b8be-b3f7ed328a6d,377-c47423ca-4aed-458b-8fde-49b8435e7953,6,,25,5,K0GQKRSYGG,9,1845768615,1,256,9,112956879726,3,2014-09-02T12:29:59.512Z,1845768615,2014-09-02T12:29:59.754Z,2,112956879726,8,3,256,9,1,false,How is the weather?,http://survey.genesys.com
377-ee9920b1-32a6-4900-b8be-b3f7ed328a6d,377-3b58e66c-f499-4765-a1ff-860e8b2d12e2,2,,6,9,7YHBF2VXOG,9,1845768615,5,256,4,112956879726,3,2014-09-02T12:29:58.551Z,1845768615,2014-09-02T12:29:58.829Z,5,112956879726,6,6,256,7,4,false,How is the weather?,http://survey.genesys.com
377-ee9920b1-32a6-4900-b8be-b3f7ed328a6d,377-c7ec4edf-f4d6-4b76-8d99-aae94b9e92fd,7,,54,10,FPWOYDY8HW,6,1845768615,2,256,3,112956879726,3,2014-09-02T12:29:58.863Z,1845768615,2014-09-02T12:29:59.124Z,5,112956879726,9,2,256,9,2,false,How is the weather?,http://survey.genesys.com
377-ee9920b1-32a6-4900-b8be-b3f7ed328a6d,377-fd30f203-3b62-465a-90e6-d2f6c7332c78,1,,55,3,XPJH03AV37,7,1845768615,5,256,5,112956879726,4,2014-09-02T12:29:59.802Z,1845768615,2014-09-02T12:30:00.031Z,4,112956879726,10,6,256,1,4,false,How is the weather?,http://survey.genesys.com
377-ee9920b1-32a6-4900-b8be-b3f7ed328a6d,377-c8503d05-784d-4037-aadc-e70874a5c053,10,,35,5,C6K8NTU2UC,9,1845768615,3,256,8,112956879726,4,2014-09-02T12:29:59.178Z,1845768615,2014-09-02T12:29:59.467Z,5,112956879726,7,4,256,2,5,false,How is the weather?,http://survey.genesys.com
service_id,state_id,state_type,previous_state_id,est_duration,disposition,disposition_desc,start_resource_type,start_session_id,start_media_type,start_resource_id,start_application_type,start_interaction_id,start_application_id,start_timestamp,end_session_id,end_timestamp,end_media_type,end_interaction_id,end_application_id,end_resource_type,end_resource_id,end_application_type,survey.question1,survey.question2,survey.question3,survey.url

C:/export_20140902_125024_170_tasks.CSV file

377-ee9920b1-32a6-4900-b8be-b3f7ed328a6d,,377-e438be2b-c3a8-4c2d-aa2b-018cc860df88,3,65,9,KC8TNWEQK8,5,1845768615,3,256,10,112956879726,5,2014-09-02T12:29:59.850Z,1845768615,2014-09-02T12:29:59.900Z,2,112956879726,5,7,256,3,JohnD,272,blue
377-ee9920b1-32a6-4900-b8be-b3f7ed328a6d,,377-931a6f65-2f76-4675-b892-492c24680a7d,5,16,10,Y15M9U1SVB,8,1845768615,3,256,8,112956879726,10,2014-09-02T12:29:58.617Z,1845768615,2014-09-02T12:29:58.682Z,5,112956879726,3,3,256,4,JohnD,266,blue
377-ee9920b1-32a6-4900-b8be-b3f7ed328a6d,,377-ebff6032-1306-461b-9234-99315d836eed,9,57,7,VXF9BW8YJ9,2,1845768615,4,256,9,112956879726,7,2014-09-02T12:29:59.568Z,1845768615,2014-09-02T12:29:59.622Z,3,112956879726,2,10,256,6,JohnD,508,blue
377-ee9920b1-32a6-4900-b8be-b3f7ed328a6d,,377-bfbabd29-3384-4926-b275-43e0f538c454,2,97,8,SPYF4CB6PT,9,1845768615,5,256,7,112956879726,10,2014-09-02T12:29:59.233Z,1845768615,2014-09-02T12:29:59.301Z,1,112956879726,10,6,256,3,JohnD,108,blue
377-ee9920b1-32a6-4900-b8be-b3f7ed328a6d,,377-378ae588-d76b-4567-8557-e976032e2d0c,2,46,10,058GAT2KSY,6,1845768615,4,256,6,112956879726,1,2014-09-02T12:29:59.363Z,1845768615,2014-09-02T12:29:59.423Z,2,112956879726,7,2,256,8,JohnD,644,blue
377-ee9920b1-32a6-4900-b8be-b3f7ed328a6d,,377-f63d0dc7-4ac2-4135-ad4c-d0b23aae7395,3,47,2,9C1QDWKQDF,7,1845768615,4,256,5,112956879726,5,2014-09-02T12:29:59.947Z,1845768615,2014-09-02T12:29:59.987Z,3,112956879726,1,2,256,1,JohnD,189,blue
377-ee9920b1-32a6-4900-b8be-b3f7ed328a6d,,377-9f83dbf4-e9cc-4a47-9531-f6d9dcba9595,7,48,3,B7N0COQ8US,5,1845768615,5,256,7,112956879726,10,2014-09-02T12:29:59.026Z,1845768615,2014-09-02T12:29:59.082Z,1,112956879726,6,8,256,8,JohnD,836,blue
377-ee9920b1-32a6-4900-b8be-b3f7ed328a6d,,377-67ce4f33-16db-47c1-adb9-3eb61b25e795,7,55,1,MNX8V1U2KT,3,1845768615,2,256,9,112956879726,4,2014-09-02T12:29:59.664Z,1845768615,2014-09-02T12:29:59.718Z,4,112956879726,10,7,256,1,JohnD,1,blue
service_id,state_id,task_id,task_type,est_duration,disposition,disposition_desc,start_resource_type,start_session_id,start_media_type,start_resource_id,start_application_type,start_interaction_id,start_application_id,start_timestamp,end_session_id,end_timestamp,end_media_type,end_interaction_id,end_application_id,end_resource_type,end_resource_id,end_application_type,TEIdentificationInfo.Username,TEIdentificationInfo.PIN,TEIdentificationInfo.SecQuestionAnswer
This page was last edited on September 7, 2018, at 10:34.
Comments or questions about this documentation? Contact us for support!