aircall | Aircall API for node | Runtime Evironment library
kandi X-RAY | aircall Summary
kandi X-RAY | aircall Summary
An Aircall API for node.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Construct a new Irm instance .
- Constructs a new API object
- Contacts .
- Users .
- Constructs a Calls
- Tags .
- Number constructor .
aircall Key Features
aircall Examples and Code Snippets
Community Discussions
Trending Discussions on aircall
QUESTION
So what I am basically doing is, I have an API of call activities and its own details.
I have to archive a call and in that API of calls, each call has a field called "is_archived"
I need to be able to update the API using a click of a button to archive a call. (So basically change the field of "is_archived" from "false" to "true" once the button is clicked)
And once that call has been archived, it shouldnt render nor be displayed on the application anymore.
I'm getting a "Failed to load resource: the server responded with a status of 400 (Bad Request)" with my code and I'm sure I'm doing something wrong, I just cant spot it.
Thank you!
Here is my code so far:
App.jsx
...ANSWER
Answered 2021-Sep-25 at 07:11For some reason, I'm not sure why, but if you have no-cors mode set on your fetch POST request, the content-type on your request gets changed to text/plain.
Fetch API - Content-Type is sent as text/plain when it's set to application/json
I was able to figure this out by duplicating your request in a sandbox, right-clicking your request in Chrome's network tab, and choosing "Copy as cURL". Then import it into Postman so I could replicate the exact request. There I could see it was converted into a plain-text content instead of a JSON body as intended.
Of course you can also see these things in the requests inside the network tab, but sometimes putting it inside Postman makes it stand out more clearly.
So the solution is to simply omit the "no-cors" option and your request works fine in React.
QUESTION
I have 0 experience in coding in APEX so I would greatly appreciate your help and support with this question!
I would like to figure out a way to automate the deletion of an Aircall User if an SF user is deleted. Let us assume that every SF user has an Aircall ID that is present in their User profiles, stored in a field called 'Aircall ID'. This is what I will need to form the delete request.
I want that when a user is deleted on Salesforce, it triggers a delete request to Aircall sending the value that was previously stored in the Aircall ID field to the specific endpoint in question.
I need help figuring out how to write an APEX trigger that sends the Aircall ID to the class (to be triggered after the user is deleted) and finally how to automatically trigger the execution of this class after the ID has been received in order to complete the User deletion on Aircall's platform.
...ANSWER
Answered 2021-Jul-08 at 22:19https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_user.htm
"You can’t delete a user in the user interface or the API. You can deactivate a user in the user interface; and you can deactivate or disable a Customer Portal or partner portal user in the user interface or the API. Because users can never be deleted, we recommend that you exercise caution when creating them."
For deactivations you'll need something like this. (It's not written to best practices, ideally the trigger would be "thin" and actual processing offloaded to helper class. Also it assumes you mass update max 10 users at a time because that's the limit of callouts.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install aircall
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page