The provided sample includes:
- Connecting to the Copper API
- Interacting with the following objects:
- Users
- People
- Opportunities
-
https://app.prosperworks.com/companies/391648/app#/settings/api-keys
-
https://support.copper.com/hc/en-us/articles/115000816826-Code-samples-and-tips
This solution was developed in the Linx Designer v5.20.2.0
The time of writing is 2021-05.
- Linx Designer
- Copper account
- Create a new account on Copper
- You'll need your API Key from Copper to enter into the API Endpoint URL. To generate an API Key, in the Copper web app go to System settings > API Keys and click the GENERATE API KEY button.
Note the API Key and Email (Creator) details.
Open and Configure the Solution's $.Settings:
- Open the solution in your Linx Designer.
- Edit the $.Setting values:
- CopperApiToken: Your API Key.
- CopperEmail : Your Email
- Save the Solution.
Generic Templates Description: The templates can be used as follows:
Opportunities:
- ListOpportunitiesSearchBy Usage:
- Parameter: Receives a JSON string for CallRESTEndpoint body
- Result: Receives Opportunity List
- ListPipelines Usage:
- Result: Receives Pipelines List
People:
- CreateNewPerson Usage:
- Parameter: Receives a JSON string for CallRESTEndpoint body
- Result: Receives person created as a JSON string
- ListPeopleSearchBy Usage:
- Parameter: Receives a JSON string for CallRESTEndpoint body
- Result: Receives People List
- UpdatePerson Usage:
- Parameter: Receives a JSON string from CallRESTEndpoint body
- Result: Receives person updated as a JSON string
Users:
- ListUsers Usage:
- Result: Receives Users List Utilities
- FormatDate: Converts a unix timestamp to datetime
- Open and configure the settings.
- Create a directory at ‘C:\Temp\Copper\’ , for
$.Settings.LogFile and $ .Settings.WorkSheetPath in Linx Designer. TextFile log.txt and Excel sheet Report.xlsx will be created in ‘C:\Temp\Copper\’. You can always change the paths in the settings according to your choice.
CreateANewPerson
- Creates a new person and saves the result in a log file in the path $.Settings.LogFile
ListPipelines
- Get Pipelines and saves the data in the Excel sheet $.Settings.WorkSheetPath in Sheet 3.
SaveOpenOpportunitiesInExcel
- Get Opportunities list and saves the data in the Excel sheet $.Settings.WorkSheetPath in Sheet 2.
SavePeopleInExcel
- Get people and saves the data in the Excel sheet $.Settings.WorkSheetPath in Sheet 1.
UpdatePerson
-
Updates person and saves response from $.Settings.LogFile
- Before running the UpdatePerson, open the file created in $.Settings.LogFile from CreateANewPerson. Copy the id from the textfile
-
Go to Samples>UpdatePerson
-
Click on the Function UpdatePerson in the designer
-
In the properties window, in the parameters section, locate id and paste the id copied from the textfile above.
For questions please ask the Linx community or use the Slack channel.