McDewey

Multi-vendor documentation library · semantic search · MCP endpoint at /mcp

Page 292

↗ View in doc context
page
292
source
finesse/v12.5/developer-guide/developer-guide.md
chunk_id
finesse::v12.5::developer-guide::developer-guide::276

PhoneBook—Import Contact List (CSV) This API allows an administrator to replace all the contacts in a specific phonebook by importing a list of contacts in a comma-separated values (CSV) file. The CSV file can contain up to 6000 contacts. Cisco Finesse supports a system-wide total of 50,000 contacts. All existing contacts in the phonebook are deleted before the new contacts are inserted. Contacts that contain errors are not inserted. Contacts that are error-free or contacts that contain missing or empty fields are inserted. In general, the import is fault-tolerant. The CSV file is sent using standard web form syntax and is delivered to the Cisco Finesse server as multipart/form data. This format is particular about formatting. Lines in the CSV file must be separated by carriage returns and newlines (\r\n). To import: 1. Use the PhoneBook—Get List API to get a list of all the global and team phonebooks. From the returned list, find the id of the phonebook containing the contacts that need to be replaced. The phonebook id can be found in the uri field. 2. Create a Web Form HTML file by copying the below HTML into a new file. In the form action field, replace <FQDN> with the FQDN of the Finesse server and <id> with the phonebook id obtained from Step 1. Save the file on your desktop as a HTML file. Example: phonebook.html. <form action="https://<FQDN>/finesse/api/PhoneBook/<id>/Contacts/csvFileContent" enctype="multipart/form-data" method="post"> <p> File(s): <input type="file" name="datafile" size="40"> </p> <div> <input type="submit" value="Import"> </div> </form> 3. Create a CSV file with the phonebook content you want to upload. Example: pb.csv (Also saved to the Desktop). "First Name","Last Name","Phone Number","Notes" "Agent","10001","20001","Sales" "Agent","10002","20002","Service" "Agent","10003","20011","Supervisor" "","VVB","090011","HelloWorld" "","Survivability","090011","To HelloWorld" 4. Run the phonebook.html file. A browser window opens. 5. Click Browse and select the pb.csv file. 6. Click Import. https://<FQDN>/finesse/api/PhoneBook/<id>/Contacts/csvFileContent URI: https://finesse1.xyz.com/finesse/api/PhoneBook/34/Contacts/csvFileContent Example URI: Only administrators can use this API. Security Constraints: POST HTTP Method: text/CSV Content Type: Cisco Finesse Web Services Developer and JavaScript Guide, Release 12.5(1) 276 Cisco Finesse Configuration APIs PhoneBook—Import Contact List (CSV)