I am trying to "log a call" in salesforce using REST API. Is it possible to do it with REST API and what is the exact end point?
Thanks
Inspect what's done in UI, check the ID of the generated record, then try to replicate it. From what I remember "log a call" action creates a completed Task record. Does the ID start with "00T"? http://www.fishofprey.com/2011/09/obscure-salesforce-object-key-prefixes.html
So inserting a Task should get you close enough.
POST to https://MyDomainName.my.salesforce.com/services/data/v55.0/sobjects/Task/
with headers
Authorization: Bearer <session id goes here>
Content-Type: application/json
and body
{
"Subject": "Sample call",
"Type": "Call",
"TaskSubtype" : "Call",
"CallType" : "Outbound",
"Status" : "Closed",
"WhoId" : "003... put contact id here?"
}
Should be good start. https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_task.htm is decent info although your org might need more (record types? required fields? different picklist values?)
Related
When I am tryping to request on ebay inventory API using API Exploler. I am geting the Call Respond Statud code 404.
and Following error message. can anyone help me to solve the issue
{"errors": [
{
"errorId": 25710,
"domain": "API_INVENTORY",
"subdomain": "Selling",
"category": "REQUEST",
"message": "We didn't find the entity you are requesting. Please verify the request"
} ]}
That message means there is an issue either with the item, or the SKU. Maybe you typed the SKU incorrectly. Maybe you're looking in the account of the wrong user.
But my guess... The SKU was of an item that wasn't created with the API, and was instead created manually using eBay's front end. That command only works on items also created by similar commands.
I have a problem about ebay API.
When I call the inventory_item API I get an empty result.
My request is
https://api.ebay.com/sell/inventory/v1/inventory_item?limit=2&offset=0
Response body is:
{
"total": 0,
"size": 0
}
Then I call the inventory_item API By SKU, of course I failed again.
My request is:
https://api.ebay.com/sell/inventory/v1/inventory_item/80003953
(80003953 is my sku in ebay sell platform)
Response body is:
{
"errors": [
{
"errorId": 25710,
"domain": "API_INVENTORY",
"subdomain": "Selling",
"category": "REQUEST",
"message": "We didn't find the entity you are requesting. Please verify the request"
}
]
}
I'm confirm my authorization and sku are correct!
Perhaps you are trying to get items that are created by Ebay-GUI.
This case was already discribed here
So it turns out that eBay's Inventory API is fairly new. Only items created via the Inventory API's can be queried with the Inventory API.
In my case, using the old Trading-API solved the problem.
First, try the getInventoryItems API without limit and offset values.
If the value still returns 0 as count, try to gain new token for the Bearer and double-check with the actual account in the ebay website.
It may be that you are obtaining valid token, but from another account.
Else, try to contact the developers in ebay.
The getInventoryItem (ie first url) call assumes that an item with the given sku exists, while getInventoryItems does not.
It looks like an item with sku 80003953 doesn't exist. You will need to use createOrRemplaceInventoryItem to create a new one.
I have been trying to create an app in Zapier for one of my project. On the very first step, I am doing Authentication where I choose "Basic Auth" method. I have set API URL along with details, however cannot see the expected result and seeing error in my API return value. After debugging, I found that API doesn't get the value I pass thru the Zapier. I have checked the same API in postman and it works, however it only doesn't work thru the Zapier.
Below is even more detail how I proceed, what is expected result and what I am getting:
Process we're following
We have created an App
We went to Authentication step, there we have selected “Basic Auth” option
Under the Basic Auth, we have configure with setting end point and method is “Post”
We have set our field names as Key and as value we have set “{{bundle.authData.password}” and “{{bundle.authData.username}}” in order to field mapping
Then came to Step 2 to test the authentication
Under the “Test Setup”, we have connected the current Zapier account and clicked on “Test Authentication”
This process doesn’t post any value in parameters. Hope I could explain the issue, please help us to find where we’re going wrong.
Expected Result
{
"data": {
"first_name": "Dhaval",
"last_name": "Parekh",
"email_address": "dhaval.php#gmail.com",
"phone_no": "1234567890",
"user_id": "7oiA****",
"token_id": "zNkzT***"
},
"resend_verification_link": false,
"status": true,
"message": "You have successfully Logged in!!"
}
Actual Result
{
"resend_verification_link": false,
"status": false,
"message": "The password must contain a minimum of one lower case character. one upper case character, one digit"
}
What I understand after spending too much time, is it doesn't send the data with post method and hence I'm getting this issue. While it works fine with the Get Method. So, should I consider that Basic Auth will only with work with "Get" method in Zapier? Or I'm missing any piece to include here?
Please let me know what is missing? Or even I'm going thru the wrong root. I want to create an app in Zapier to allow other apps to connect.
I am trying to do a GET operation on
GET https://api.softlayer.com/rest/v3/SoftLayer_Account/VirtualGuests?objectMask=powerState%3BoperatingSystem.passwords%3Bdatacenter%3BbillingItem%3BblockDevices.diskImage%3BtagReferences
> Headers: Authorization: Accept : application/json
Response:
{
"error": "Internal Error",
"code": "SoftLayer_Exception_Public"
}
I found out that the results is too big, If I do a resultLimit on the API it works.
My question is, I have instance Id with me how Can I include it in the above API. I tried adding &id=XXXXXX at the end of the API it didn't work
I think you want to get only the data which contains the instance with ID correct?
well if you want the VM whose id = instace ID you can use the Softlayer_Virtual_Guest::getObject method instead Softlayer_Account::getVirtualGuests
http://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/getObject
If you are looking for something more complex you can try objectFilters
https://sldn.softlayer.com/article/object-filters
if you have more questions let me know.
I have a software, which allows you to create a reply to a comment on your youtube video. Therefore I use the youtube API v3 comments.insert method.
POST https://www.googleapis.com/youtube/v3/comments?part=id%2Csnippet&access_token=[access_token]
{
"snippet": {
"parentId": "parentId",
"textOriginal": "test message"
}
}
Most of the time the requests are successful. But for some comments I can't create replies this way. The API always returns:
{
"error": {
"errors": [
{
"domain": "youtube.comment",
"reason": "processingFailure",
"message": "The API server failed to successfully process the request. While this can be a transient error, it usually indicates that the requests input is invalid. Check the structure of the <code>comment</code> resource in the request body to ensure that it is valid.",
"locationType": "other",
"location": "body"
}
],
"code": 400,
"message": "The API server failed to successfully process the request. While this can be a transient error, it usually indicates that the requests input is invalid. Check the structure of the <code>comment</code> resource in the request body to ensure that it is valid."
}
}
I'm using a valid access token and the parentId is valid, too, because I can retrieve it through the API.
I took a look at the successful and failing requests, but didn't find any difference. So I assume that the request input isn't invalid as it is mentioned in the error message.
In my opinion this error isn't a transient error, because the same requests are still failing after some days.
I also tried to create a reply on such a comment through the API Explorer but the result was the same.
Does anyone have the same problems or am I doing something wrong?
When I go to the video and look at the comments directly, the comment with ID z13tjxdqnuygy1lga04cilcqxqipg1zbtbs has a "reply" option under it, while the comment with ID z13rgftjgw3bulyou04ccfnbjofztxg54yo0k does not. It seems that the user posted the comment via their Google+ page and disabled replies to their posts.