API3
erdemsenol at May 23rd, 2022 08:22 — #1
We can sort deals by amount or status in the onePageCRM dashboard. But API3 doesn't give us these options? Any tips how we can sort deals other than date value?
sajedalmorsy at May 23rd, 2022 12:01 — #2
Hi erdemsenol,
Thanks for reaching out to OnePageCRM again
The deals are only sortable by the following fields currently:
- created_at
- modified_at
- expected_close_date
- date
- close_date
We will also suggest it to our Product team to add these improvements to the Development Roadmap.
Sajed Almorsy
OnePageCRM
oliviafray at December 12th, 2023 04:05 — #3
If the API response includes all the necessary data but is not sorted the way you want, you can transform the data in your application. For instance, if the API returns JSON data, you can use your programming language to manipulate and sort the JSON objects based on your criteria.Here's a general example in Python assuming you have a list of deals in JSON format:
import requests
Make API request to get deals
response = requests.get('your_api_endpoint')
deals = response.json()
Sort deals by amount
sorted_deals = sorted(deals, key=lambda x: x['amount'])
Alternatively, sort by status
sorted_deals = sorted(deals, key=lambda x: x['status'])
Now sorted_deals contains the deals sorted by amount or status
sofiya85 at January 19th, 2024 07:27 — #4
You can implement custom sorting on your end. After retrieving the deals use programming logic to sort the results based on amount.
Powered by Discourse, best viewed with JavaScript enabled