There is an undocumented endpoint for getting records from a Data Extension using REST, with a filter defined by request parameters to the endpoint:
GET /data/v1/customobjectdata/key/YOURDEEXTERNALKEY/rowset?$filter=emailAddressemail@example.com' HTTP/1.1
Authorization: Bearer YOURAUTHTOKEN
If it is subject to use the Metadata API only, I don't see a method to accept an ID instead of the fullName.
However, if you are able to also use the REST API, the URL to retrieve data of a particular profile by ID is (API version can be changed):
If you need to find the ID of all profiles, the URL is:
Yes, you're allowed to upsert against a Salesforce ID. You can read more about this in the various documentations, such as REST and SOAP. In fact, in some objects, you can even use the Name field, as long as the idLookup property is true for that field. In fact, the documentation even calls this out explicitly:
This example uses the POST method as a special ...
SOAP API only creates in Classic Content, which means if your email was created it would be in the classic email section. (Which may no longer be possible since Classic is being sunset)
To create a new email you need to use the Content Builder REST API.
An API call is an inbound request, an API callout is an outbound request.
API calls are rate-limited, limiting clients to the number of calls they are allowed to make daily. One API call costs one API call towards this limit. That means that updating 200 records costs the same as updating 1 record, if you place them in the same payload. It doesn't matter if ...
Something went wrong with the web service call and you likely received some HTTP 400 or 500 error. Which starts with a <.
You should System.debug(res.getBody()) to see what exactly the service returned.
If you have the access token or a session id (but preferably the access token), then you don't need anything else. It's getting the access token that requires the connected app and the user details.
There are a selection of OAuth 2.0 flows. The flow you're currently using is the username-password flow, which is only recommended for testing.
The consumer key (...
Connected apps can be installed in more than one org. The definition (where you manage things like the connected app name, the oauth scopes, can see the consumer key and consumer secret, digital certificate to use, etc...) lives in a single org, and it should generally be a permanent org.
The connected app policies (how long access tokens are valid for ...
There isn't a great way to do this. The best approach would be to build a custom activity, but the following approach should work:
Create a script activity containing your SSJS and save it as a code snippet*, with the following code:
// insert your script here
Documentation about MC Connect and authentication between clouds:
Quote from above documentation:
"Connected App Authentication is a secure authentication mechanism used by Marketing Cloud Connect. It removes the need to manage any Sales or Service Cloud user passwords in ...
The API Request Limits documentation goes into a bit more detail
Limits and allocations are enforced against the aggregate of all API calls made to the org in a 24-hour period. Limits and allocations are not on a per-user basis.
Example API Usage Metering Calculations
The following examples illustrate API usage metering calculations for several scenarios.
This should be relatively straightforward, you probably didnt tell your code which Triggered Send to send.
In this bit:
/* Specify the external key of the TriggerSend */
SetObjectProperty(@ts_def, "CustomerKey", @ts_extkey)
you are referencing the variable @ts_extkey but your subscriber might be in a condition where it's not set.
You have not ...
There is no support for attaching files in the endpoints for neither the classic Triggered Send nor for the new Transactional Messaging API. Hence you will need to use Ampscript within the email itself to request the file and attach it. As outlined in this and numerous other threads on file attachments in Marketing Cloud, you can use the AttachFile function ...
Modify All is not the right permissions that should be granted here. It will give them delete access which is not desired!
You can instead use a simple criteria-based sharing rule(say criteria is designed to pick all record types or alternatively records with the created date not equal to null)/ owner based sharing rule and add your Integration users to a ...
A seemingly simple question, but you really have to involve a few things in SFMC.
A bit of a chain of things to prepare inside SFMC, but then pretty straightforward. Note, as you will need automation studio involve, you would get this on an hourly update basis, not in real time.
The main missing link is described here.
Note: You must have MobileConnect or ...
+ is a "reserved character" in URLs; it represents a space character. Also, @ is a reserved character. To pass in a literal +, use %2B, and for @, use %40, as in:
There are other characters you need to look out for, too. See Percent Encoding for more details.
Also, generally speaking, any Unicode character that doesn't ...
Dynamically creating a Trigger is the most dangerous, and among the worst, ways to accomplish data synchronization. You should investigate features like
Change Data Capture
The sObject Get Updated endpoint
While creating and deploying a Trigger via the Metadata API is possible, data sync triggers are not easy to write in a way that is resilient to volume. ...
You won't find any information about the limits within Marketing Cloud. There is a number of metric subject to licensing (super messages, business units, contacts, api calls), but getting the actual status (consumption vs allowance) is not possible utilising any of the APIs, neither it is something which is visible in the user interface as well.
In the benefit of others, after reaching out to Salesforce, it was understood that the payload needs to be modified in such a way that it either passes the culture code which is required to be 'US' only, or we can pass the created date or modified date in the payload. This is a know issue in Salesforce.
Also, the value for Opt In needs to be passed as '2', ...
We went with SAML SSO, Azure App registration (when publishing API), Auth Provider in SF (to get token for use with API), and Named Creds (to tie it all together):
There's several ways to do this.
The easiest way to do this is to use a Salesforce-compatible ESB (Enterprise Service Bus) such as Neuron ESB (note: this is not a product recommendation, it just happens to be the only one I've seen that I know is compatible; do your own research).
Using the ESB, you can set up an endpoint the developers can use to request ...
It is fine to get 204 No Content using the PATCH method as long as you are using REST API version 45.0 and earlier:
In API version 45.0 and earlier, the HTTP status code is 204 (No Content) and there is no response body
In API version 46.0 and later, the HTTP status code is 200 (OK) and the successful response is:
"id" : "...
There's no real magic to it. You must create all of the other metadata changes that you expect to have happen.
For Layouts, you'd have to pull the existing Layout metadata, make changes to it to add your new field in the desired position, and then redeploy it. You can do this using the Apex Metadata API, if desired, or use the Tooling or Metadata APIs.
I did the following and was able to get the shortUrl:
var result = HTTP.Post(url, contentType, Stringify(payload), headerNames, headerValues);
var resultStringified = Stringify(result)
var obj = Platform.Function.ParseJSON(resultStringified);
var objResp = Platform.Function.ParseJSON(obj.Response);
var shortUrl = objResp.shortUrl;
It is not possible to have folder specific access in Enhanced FTP. All the users which are created in a specific Business Unit, all share access to same folder structure.
If having multiple users with different access rights on specific folders, the only option is an external SFTP where you can work with more specific permissions.
You need to parse the JSON response and select the value that you are looking to populate. You can do this fairly easily with SSJS:
/* GET HTTPGET RESPONSE */
var jsonResp = Platform.Function.ParseJSON(Platform.Variable.GetValue("@shortenUrl"));
/* GET SHORT ...
Generally speaking, you have two options. The first option is to set up a server on localhost, and listen for a connection from the browser at the end of the flow. This is often something like https://localhost:1717/oauth/success. This is how the Salesforce DX CLI operates. The second option is to listen to a WebView or similar component for when you land on ...