API for fetching Support tickets for a user from salesforce - salesforce

I am working with Salesforce API and need to fetch all the support tickets against a user but I am not able to find any REST API for fetching the tickets.
Can anyone let me know if there is such REST API is there?

There is no standard object in Salesforce called a Support Ticket. You may be using the Case standard object, or a custom object; regardless, it won't have its own API endpoint.
You'll want to use the Query REST endpoint to execute a SOQL query to locate the records you need.

Related

how to update subscription trail period in paypal using rest api for react.js

How can I update my subscription trial period for a monthly plan using rest API for react.
I have searched in the rest api section but didnt find any.
The Update Subscription API call allows patching the /plan/billing_cycles object. The details of what is possible are documented there so I'm not sure what your question is about.

How to get all unique email recipients python gmail api

I want to do a search for all unique email recipients from gmail. But I'm really struggling with API. If I was interacting with a SQL database I would want something like:
SELECT DISTINCT EmailRecipient FROM MyHypotheticalGmailTable;
But I'm not sure how to translate this into a gmail API call.
I suggest you start by taking a look at the Gmail API Quickstart with Python here.
Afterwards you may want to take a look at threads.list in order to list all the threads available and then for each one use threads.get. Since there is no direct method of retrieving the unique email recipients, you will have to handle this separately from the API calls and filter the results programmatically.
Reference
Gmail API Python Quickstart;
Gmail API messages.list;
Gmail API messages.get.

Salesforce Apex Callouts to Marketing Cloud

I need to make an Apex Callout to Marketing Cloud when a Lead is created in Salesforce that matches certain criteria. I would like to use this MC Rest API - https://www.exacttargetapis.com/messaging/v1/messageDefinitionSends/key:Autoemail/send. The issue then is that I first need to authenticate with MC to get an Access Token to pass when making the above API call. Does anyone have a good way to persist the Access Token in a Salesforce org? I'm thinking of storing it in a Custom Setting and only updating it when an Apex callout goes to use it and sees that it's nearly 60 minutes old. Is anyone doing something similar? Thanks!
If you know that access token to external service can be expired and should be updated sometimes automatically, the better approach is which you choose - custom setting (or custom object for storing it).
If this token can be hardcoded one time and it will not be changed for a long period, you can checkout Authentication Settings for External Systems functionality.

Salesforce - HubSpot API calls

in my current company we are using Salesforce and HubSpot, and we have synchronized Contacts and Leads.
HubSpot does around 7000-8000 daily api calls, but I do not know what is the frequency HubSpot connects to Salesforce, or if there are some ways to reduce this number.
Thanks.
Salesforce limits its API calls with the edition and licenses you have see this link
(https://help.salesforce.com/HTViewHelpDoc?id=integrate_api_rate_limiting.htm)
and for reducing the api calls from Hubspot end follow this link
(http://knowledge.hubspot.com/salesforce-integration-user-guide/how-to-adjust-your- salesforce-api-call-limit)
If you go over you're API call quota, Salesforce will send you an automated email letting you know of the overage.
The usage limit for the lowest edition of Salesforce is 15,000. If you're currently at 8k/day, I wouldn't worry yet.

Salesforce API UpsertResult scheme

Is there any way to customise the fields that are returned after a successful Salesforce Upsert call?
I was hoping it would just be a case of changing the definition of the UpsetResult within my enterprise WSDL, but that didn't work.
I want to reduce the number of API calls I make by returning the OwnerId of the upserted object along with the standard fields, but I can't find anywhere within Salesforce where I can change what is returned.
No, you can't change what's returned by the standard upsert call. One option would be to write an apex web service that does upsert followed by query in apex and have it return the data you want that way. The call to your apex web service would only count as 1 api call, reducing the number of calls you're making.

Resources