how to export customer from livechat list for free, Live Chat and Chat Support Software

    Which Chat Support Software is better?

    I have talked about this before, but it is better to choose this one. Livechat is very mature. The 10% off coupon is here , and interested students can take a look.

    The reason and motivation for choosing it, you can read my previous articles, the foreign trade customer service software livechat offers discounts, and you can use the paid functions for free in just a few steps .

    How to get the most services with less money from livechat?

    Software is cheap, reports are expensive

    Before giving a method to use the interface of face book to return data to google analtyics. This time I have a new problem.

    After using livechat for a year, I have accumulated a lot of customer data, and now I want to export them, do analysis, engage in EDM email marketing, and activate silent users.

    Don't ask why customers didn't manually enter the CRM after inquiries. Our sales are very strong, small customers, and customers who are not 100% sure. People don't like them and will not enter them.

    Here comes the tricky job, to export the customer list, to export the customer list, to export the customer list.

    I asked the customer service of livechat, and they told me a very painful answer. The original words said so.

    If you would like to export the mentioned emails you would need to use our API call list_archives to pull the information about chats including the emails https://developers.livechat.com/docs/messaging/agent-chat-api#list-archives . If you would consider upgrading to the Business plan, there is a feature called "Export Raw Data" available. It allows for downloading the report about the chats in the CSV format including the list of emails from the pre-chat forms
    https://www.livechat.com/help/advanced-reports-functions/#export-data-to-create-your-own-reports

    They mean that they can use the api to retrieve data by themselves, or use the reporting function that comes with the system. When I looked at the reporting function, my requirement was not within the scope of the basic report, but it was only available after an upgrade. As shown in the figure, if we have 5 seats, we will be charged an extra $1500. In order to export the data, it will cost an extra 10,000 yuan per year. Wouldn't he be fragrant if he had the money to upgrade his website server?

    how to export customer from livechat list for free, Live Chat and Chat Support Software

    how to export customer from livechat list for free, Live Chat and Chat Support Software

    This charging strategy for foreigners is a pit, and the service is particularly good. When you can't live without it and accumulate enough data, you will be out of pocket.

    Self-reliance, hard work, and the path of API. It is very expensive to find someone else to develop it. You can only learn it by yourself. After a few days, you can really figure it out. I have to say that livechat is indeed a very mature customer service consulting software. The help documentation is very friendly, and Xiaobai can also get started.

    Strong hands-on ability, you do it yourself. Weak hands-on ability, you spend money to buy . Thinking about it carefully, people are really kind, unlike some domestic software, which only pays you money to go.

    How to use livechat api export customer data

    here is code

    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf8">
    <style type="text/css">
    <!--
    body,td{
    	font-size: 14px;
    	color: #000000;
    }
    a {
    	color: #000066;
    	text-decoration: none;
    }
    a:hover {
    	color: #FF6600;
    	text-decoration: underline;
    }
    -->
     
    #text-button {
     display: block;
     cursor: pointer;
     width: 160px;
     text-align: center;
     border: 1px solid #232323;
    }
    	.user {
                    display: table;
                    width: 80%;
                }
                 
         .user .name, .user .email, .user .num {
                    display: table-cell;
                }
                 
         .user .name {
                    width: 40%;
                    background: #CCDDFF;
                }
                 
         .user .email {
                    width: 50%;
                    background: #99BBFF;
                }
    	 .user .num {
                    width: 10%;
                    background: #CCDDFF;
                }
    </style>
    </head>
    <body>
     
     
    <font color = "#FF0000" > Test to get customer data </font><br> 
    <**********lt is the termination time and gte is the termination time. The interaction model is adopted, so the time is selected from the last interaction time, not the creation time. **********> <br>
    <!--<div id="text-button"><p id="text">点击</p></div>-->
    <!--<button onclick="list_customers()">Click me</button>-->
    <button onclick = " myFunction () " > Test return value </button> 
    <p id="jianhuA"></p>
    <p id="jianhuB"></p>
    <p id="demo"></p>
     
      <script>
     
    	async function myFunction(){
    		//Request parameters up to 100 Default: 10, maximum: 100
    		//alert('clicked');
    		//document.getElementById("demo").innerHTML = JSON.stringify(fanhui());
    		//let t = await list_customers();
    		var html = '' ; 
    		var next_page_id = "";
    		var xunhuan_num = 0 ; 
    		do{
    			xunhuan_num = xunhuan_num + 1 ;
    			//let t = m;
    			let t = await list_customers(next_page_id);
    			next_page_id = t.next_page_id;
    			let customers = t.customers;
    			let total_customers = t.total_customers;
    			if (total_customers > 5000)
    			{
    				alert ( "There are too many returned items, I'm afraid it won't run, please shorten the date range and re-query" );
    				break;
    			}
    			customers.forEach(user => {
    			let htmlSegment = `<div class="user">
    									<div class = "name">${user.name}</div>
    									<div class="email">${user.email}</div>
    									<div class="num">${xunhuan_num}</div>
    								</div>`;
    			html += htmlSegment;
    			});
    		document . getElementById ( "jianhuA" ). innerHTML = `Attempting to request data, currently $ { xunhuan_num } th` ;  
    		document . getElementById ( "jianhuB" ). innerHTML = `Totally return $ { total_customers } pieces of data, please be patient`;  
    		}
    		while (xunhuan_num < 20 && typeof(next_page_id) != "undefined");
     
    		document.getElementById("demo").innerHTML = html;
    		//list_customers();
    	};
     
    	
     
    	async function list_customers(page_id){
    		//console.log("page_id is "+page_id);
    		var data = "";
    		var myHeaders = new Headers ();  
    		myHeaders . append ( "Authorization" , "Basic API token encoding" ); 
    		myHeaders.append("Content-Type", "application/json");
     
    		var raw = "";
     
    		/**测试if(typeof(page_id) == "undefined" || page_id == null){alert("a is undefined");}
    		else{alert("a is defined" + typeof(page_id));
    			console.log("is page_id empty");
    			console.log(page_id)
    		}*/
     
    		if (page_id == ""){
    			console . log ( "Execute the first unpaged request with parameters" );
    			raw = JSON.stringify({
    			  "filters": {
    				"customer_last_event_created_at": {
    					"lt": "2022-07-19T23:59:59.010200+01:00",
    					"gte":"2022-07-01T00:00:00.010200+01:00"
    				}
    			  },
    			  "limit": 100,
    			  "sort_order": "asc",
    			  "sort_by": "customer_last_event"
    			});
    		}
    		else{
    			//console.log("page_id is "+page_id);
    			raw = JSON.stringify({
    			  "page_id": page_id
    			});
    		}
    		console.log(raw);
    		var requestOptions = {
    		  method: 'POST',
    		  headers: myHeaders,
    		  body: raw,
    		  redirect: 'follow'
    		};
    		let res = await fetch("https://api.livechatinc.com/v3.4/agent/action/list_customers", requestOptions);
    		//var response = await fetch("https://api.livechatinc.com/v3.4/agent/action/list_customers", requestOptions);
    		if (res.status >= 200 && res.status < 300) {
    			return await res.json();
    			//data = Promise.resolve(response.text());
    		  } else {
    			throw new Error(response.statusText);
    		  }
    	};
     
      </script>
    </body>
     
    </html>

    Self-study for a few days and written in js, there are many problems, it is for reference only. With this, you can change the time range of the report. Measured a bit, less than 5000 is not a problem.

    Note:

     

    Foreign trade online customer service software system livechat money saving strategy 2, how to export customer list for free

    25 Jul 2022 10:24:20Comment 2

    Which foreign trade online customer service software system is better?

    I have talked about this before, but it is better to choose a foreign one. Livechat is very mature. The 10% off coupon is here , and interested students can take a look.

    The reason and motivation for choosing it, you can read my previous articles, the foreign trade customer service software livechat offers discounts, and you can use the paid functions for free in just a few steps .

    How to get the wool of foreigners livechat, get the most services with less money?

    Software is cheap, reports are expensive

    Before giving a method to use the interface of face book to return data to google analtyics. This time I have a new problem.

    After using livechat for a year, I have accumulated a lot of customer data, and now I want to export them, do analysis, engage in EDM email marketing, and activate silent users.

    Don't ask why customers didn't manually enter the CRM after inquiries. Our sales are very strong, small customers, and customers who are not 100% sure. People don't like them and will not enter them.

    Here comes the tricky job, to export the customer list, to export the customer list, to export the customer list.

    I asked the customer service of livechat, and they told me a very painful answer. The original words said so.

    If you would like to export the mentioned emails you would need to use our API call list_archives to pull the information about chats including the emails https://developers.livechat.com/docs/messaging/agent-chat-api#list-archives . If you would consider upgrading to the Business plan, there is a feature called "Export Raw Data" available. It allows for downloading the report about the chats in the CSV format including the list of emails from the pre-chat forms
    https://www.livechat.com/help/advanced-reports-functions/#export-data-to-create-your-own-reports

    They mean that they can use the api to retrieve data by themselves, or use the reporting function that comes with the system. When I looked at the reporting function, my requirement was not within the scope of the basic report, but it was only available after an upgrade. As shown in the figure, if we have 5 seats, we will be charged an extra $1500. In order to export the data, it will cost an extra 10,000 yuan per year. Wouldn't he be fragrant if he had the money to upgrade his website server?

    how to export customer from livechat list for free, Live Chat and Chat Support Software

    how to export customer from livechat list for free, Live Chat and Chat Support Software

    This charging strategy for foreigners is a pit, and the service is particularly good. When you can't live without it and accumulate enough data, you will be out of pocket.

    Self-reliance, hard work, and the path of API. It is very expensive to find someone else to develop it. You can only learn it by yourself. After a few days, you can really figure it out. I have to say that livechat is indeed a very mature customer service consulting software. The help documentation is very friendly, and Xiaobai can also get started.

    Strong hands-on ability, you do it yourself. Weak hands-on ability, you spend money to buy . Thinking about it carefully, people are really kind, unlike some domestic software, which only pays you money to go.

    How to use livechat's api to export customer data

    1. <!DOCTYPE html>
    2. <html>
    3. <head>
    4. <meta http-equiv="Content-Type" content="text/html; charset=utf8">
    5. <style type="text/css">
    6. <!--
    7. body,td{
    8. font-size: 14px;
    9. color: #000000;
    10. }
    11. a {
    12. color: #000066;
    13. text-decoration: none;
    14. }
    15. a:hover {
    16. color: #FF6600;
    17. text-decoration: underline;
    18. }
    19. -->
    20.  
    21. #text-button {
    22. display: block;
    23. cursor: pointer;
    24. width: 160px;
    25. text-align: center;
    26. border: 1px solid #232323;
    27. }
    28. .user {
    29. display: table;
    30. width: 80%;
    31. }
    32. .user .name, .user .email, .user .num {
    33. display: table-cell;
    34. }
    35. .user .name {
    36. width: 40%;
    37. background: #CCDDFF;
    38. }
    39. .user .email {
    40. width: 50%;
    41. background: #99BBFF;
    42. }
    43. .user .num {
    44. width: 10%;
    45. background: #CCDDFF;
    46. }
    47. </style>
    48. </head>
    49. <body>
    50.  
    51.  
    52. <font color = "#FF0000" > Test to get customer data </font><br>
    53. <**********lt is the termination time and gte is the termination time. The interaction model is adopted, so the time is selected from the last interaction time, not the creation time. **********> <br>
    54. <!--<div id="text-button"><p id="text">点击</p></div>-->
    55. <!--<button onclick="list_customers()">Click me</button>-->
    56. <button onclick = " myFunction () " > Test return value </button>
    57. <p id="jianhuA"></p>
    58. <p id="jianhuB"></p>
    59. <p id="demo"></p>
    60.  
    61. <script>
    62.  
    63. async function myFunction(){
    64. //Request parameters up to 100 Default: 10, maximum: 100
    65. //alert('clicked');
    66. //document.getElementById("demo").innerHTML = JSON.stringify(fanhui());
    67. //let t = await list_customers();
    68. var html = '' ;
    69. var next_page_id = "";
    70. var xunhuan_num = 0 ;
    71. do{
    72. xunhuan_num = xunhuan_num + 1 ;
    73. //let t = m;
    74. let t = await list_customers(next_page_id);
    75. next_page_id = t.next_page_id;
    76. let customers = t.customers;
    77. let total_customers = t.total_customers;
    78. if (total_customers > 5000)
    79. {
    80. alert ( "There are too many returned items, I'm afraid it won't run, please shorten the date range and re-query" );
    81. break;
    82. }
    83. customers.forEach(user => {
    84. let htmlSegment = `<div class="user">
    85. <div class = "name">${user.name}</div>
    86. <div class="email">${user.email}</div>
    87. <div class="num">${xunhuan_num}</div>
    88. </div>`;
    89. html += htmlSegment;
    90. });
    91. document . getElementById ( "jianhuA" ). innerHTML = `Attempting to request data, currently $ { xunhuan_num } th` ;
    92. document . getElementById ( "jianhuB" ). innerHTML = `Totally return $ { total_customers } pieces of data, please be patient`;
    93. }
    94. while (xunhuan_num < 20 && typeof(next_page_id) != "undefined");
    95.  
    96. document.getElementById("demo").innerHTML = html;
    97. //list_customers();
    98. };
    99.  
    100.  
    101. async function list_customers(page_id){
    102. //console.log("page_id is "+page_id);
    103. var data = "";
    104. var myHeaders = new Headers ();
    105. myHeaders . append ( "Authorization" , "Basic API token encoding" );
    106. myHeaders.append("Content-Type", "application/json");
    107.  
    108. var raw = "";
    109.  
    110. /**测试if(typeof(page_id) == "undefined" || page_id == null){alert("a is undefined");}
    111. else{alert("a is defined" + typeof(page_id));
    112. console.log("is page_id empty");
    113. console.log(page_id)
    114. }*/
    115.  
    116. if (page_id == ""){
    117. console . log ( "Execute the first unpaged request with parameters" );
    118. raw = JSON.stringify({
    119. "filters": {
    120. "customer_last_event_created_at": {
    121. "lt": "2022-07-19T23:59:59.010200+01:00",
    122. "gte":"2022-07-01T00:00:00.010200+01:00"
    123. }
    124. },
    125. "limit": 100,
    126. "sort_order": "asc",
    127. "sort_by": "customer_last_event"
    128. });
    129. }
    130. else{
    131. //console.log("page_id is "+page_id);
    132. raw = JSON.stringify({
    133. "page_id": page_id
    134. });
    135. }
    136. console.log(raw);
    137. var requestOptions = {
    138. method: 'POST',
    139. headers: myHeaders,
    140. body: raw,
    141. redirect: 'follow'
    142. };
    143. let res = await fetch("https://api.livechatinc.com/v3.4/agent/action/list_customers", requestOptions);
    144. //var response = await fetch("https://api.livechatinc.com/v3.4/agent/action/list_customers", requestOptions);
    145. if (res.status >= 200 && res.status < 300) {
    146. return await res.json();
    147. //data = Promise.resolve(response.text());
    148. } else {
    149. throw new Error(response.statusText);
    150. }
    151. };
    152.  
    153. </script>
    154. </body>
    155.  
    156. </html>

    Self-study for a few days and written in js, there are many problems, it is for reference only. With this, you can change the time range of the report. Measured a bit, less than 5000 is not a problem.

    postscript, self-study notes

    The live api sample is very detailed, just follow the instructions. For Xiaobai, the more difficult part is the customer authentication step.

    His method of first going to livechat to get the token and then jumping to other pages has no time to study. I use the most primitive username and password method.

    Basic authentication scheme.

    This is to put the username and password together according to the format, and then 64-bit encoding. It doesn't matter if you don't understand. You can obtain the processed login information Personal Access Tokens through postman. See below

    how to export customer from livechat list for free, Live Chat and Chat Support Softwarehow to export customer from livechat list for free, Live Chat and Chat Support Softwarehow to export customer from livechat list for free, Live Chat and Chat Support Software

    After passing the user verification level, it will be much simpler later, and you can write in which language you know.

    The code of the post data can be obtained with postman. Just need to get the response data on the line. The API of livechat returns a maximum of 100 pieces of data at a time, which needs to be obtained in a loop.

    Those unsolved pits

    1. The contact data has duplicates, which should be unique in principle, but the result it gives is duplication.
    2, paging inexplicably lost data. Use the postman example given by the livechat official website to query, and the data is also lost.
    For example, if 34 results are returned, if you set limit = 100, it will be 34. Singular if the limit is 15 per page, it should be 3 pages, but he only returns 2 pages. The second page does not give the next page id.
    Repeated tests have the same result. Its paging principle is very complicated, and I don't want to study it.
    Therefore, if you want to pursue all data, it is best not to paginate, you can shorten the time period and reduce the results, and obtain data by cyclically modifying the query time period.
    Most of the customer data can be exported for free, which is not bad. What more bicycles are there? It is hard to say whether the data can be exported without spending money.

    I am not a foreigner, and I operate a foreign trade site. Why do I choose livechat customer service software? Please also see the N reasons for choosing it .

    With the operating money, I have to work as a programmer, and I don't even give a chicken leg. The king is not happy, the king is not happy, the king is not happy. I'm obliged to advertise this animation. If I don't do anything else, I'll just rush to the name and be happy when I shout.

    After reading this nanny-style teaching,

    Developer Console Tutorials #5 | LiveChat Agent Chat API authorization

    Finally figured out the login method of the advanced point.

    The 10% off coupon is here

     

    Anonymous

    Comment

    Anonymous Write

    :?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: