New answers tagged

0

You can get all your journeys history through interactions undocumented REST API. First of all, you need to get your journey's Definition ID via a GET call to: /interaction/v1/interactions/?name=JOURNEY_NAME The Definition ID is located inside a nested array called items. Then, through a POST call to the endpoint below, you can get all you journeys ...


1

You can not start an automation using REST API. For the time being, you can use the undocumented REST endpoint below to schedule your automation, then you'll have to activate it manually from the UI. Doing some investigation on the network tab of the browser, It appears that Automation Studio is using some beta REST endpoints that are available only for ...


0

Looking at the current documentation for the Marketing Cloud API it seems that Automation (and related objects) are only available via SOAP. The available objects in the REST API look different.


3

Your JSON doesn't match your data structure. In Apex, you have public cls_Transaction[] Transactions; in the plural, but your JSON has "messages":{ "Transaction":[ { in the singular.


0

So for this query to return any value in test class, we need LeaveDate to be in past 30 days or less. Create object in the test class with LeaveDate = Date.today().addDays(-30); For example: object obj = new object(LeaveDate = Date.today().addDays(-30),FullName = 'Test Name',Worklocation = 'test',Email = 'test@test.com'); insert obj;


1

This is because Event Monitoring for that Report Export event is not activated at your org. For more information, refer Enable Event Monitoring


0

Can it be the case that more than one callout is being triggered? If that's the case, here's a good start point https://developer.salesforce.com/blogs/developer-relations/2013/03/testing-apex-callouts-using-httpcalloutmock.html


2

You must have an unmocked callout in code that is invoked by your Account and Case tests, directly or indirectly. The most likely scenario based on your description is that some automation on Case invokes an update on Account - perhaps some type of roll-up functionality. Your refactoring of Account-related code introduced a new code path that executes on ...


0

It is HTTP Status code. The HyperText Transfer Protocol (HTTP) 302 Found redirect status response code indicates that the resource requested has been temporarily moved to the URL given by the Location header. See more here https://en.wikipedia.org/wiki/HTTP_302


5

You should add in a decision split after your custom activity that checks whether that date is NULL in the data extension. If it is, then have a wait step (15mins - 1hr) before you rejoin the path and proceed to your wait by attribute step. This would also allow your application time to log any contacts where the insert failed and then run batch jobs to try ...


0

Based on our chat conversion, i would suggest you do some trailheads on integration to understand how to integrate with external systems. Go through the apex integration services trailhead There is also a superbadge for data integration which you should go through to get more hands on work. Finally for your question Get the URL, request, response schema ...


1

you are mixing here the concept of start and execute methods of Database.Batchable<sObject> interface. in start, you are writing a query, that defines what records should be processed in execute method. Just a filter for records that should be selected. In order to set size of records passed to execute method as a scope, use Database.executeBatch(...


0

There's a lot going on here, so I don't think I can share a comprehensive or conclusive answer, but I think the key is that run() has to complete before your Azure function returns a status: result = run(username, password, token, is_sandbox, master_territory, follower_territory) return func.HttpResponse(result) Then, in run(), you perform a SOQL query ...


0

I just tried the same plugin installation command: sfdx plugins:install @muenzpraeger/sfdx-plugin It appeared to do a number of steps that aren't showing in your screenshot. C:>sfdx plugins:install @muenzpraeger/sfdx-plugin This plugin is not digitally signed and its authenticity cannot be verified. Continue installation y/n?: y Finished digital ...


0

There is FuelSDK. https://github.com/salesforce-marketingcloud/FuelSDK-Java This SDK is more complete than the accepted answer (which is now outdated). From the link: The Salesforce Marketing Cloud Java SDK enables developers to easily access the Salesforce Marketing Cloud (formerly ExactTarget) via the Java platform. Among other things, the SDK: ...


1

I think the problem lies here new Blob(l, {type: "image/jpeg"}); Blob constructor needs first parameter as byte array where as in your example you are providing it as base64 encoded string. Now you have to convert the base64 encoded string to byte array. I tried to update your code and after converting the base64 into byte array it seems to be working. ...


1

Salesforce Support has logged a bug internally. For reference, the work item is W-6965020. At the time of posting, I don't believe a "known issue" document has been issued.


4

A 204 response cannot include a message body: A 204 response is terminated by the first empty line after the header fields because it cannot contain a message body. -- RFC 7231 In fact, a 204 might not be appropriate here, since you're trying to convey a message that is arguably not a "success" message; you're asking the client to do something ...


3

I dont know if there is a direct way to do it. However, there is a data view containing the information.Attributes in _PushAddress and _PushTag Data Views So you could have an automation running getting the info from that data view and write it to a data extension. That data extension can then be accessed with REST API.


0

Salesforce limits apply, when you executing operations in SF. Your python app will first retrieve all data from SF(Probably using BULK API) and then process it in python code, probably then upload back into SF. The only limit you have to worry about is API limit and Bulk Job limits


1

When using the oAuth 2.0 token you need to ensure you are passing the account_id parameter to ensure the call is executing in the correct MID. By default the token assumes the MID of the MID that installed package is created in, and this API key is not found within that MID


0

Since it's possible for a delivery failure, it would be a better idea to allow the client to specify the last known timestamp so it can resume from there: @HttpGet global static Account[] getRecords(DateTime lastKnownTime) { return [SELECT ... FROM Account WHERE LastModifiedDate >= :lastKnownTime AND ...]; } The client should send the parameter to ...


1

You should encode your query, so it will look somehow like: SELECT+Id+FROM+PRODUCT2+WHERE+ProductCode+=+%27M5Z55UP%23ABC%27 The spaces can be parsed both with + and %20 encodings.


1

It seems like you are missing the data attribute in your JS Code. Also you should be using the /composite/tree/{sobject} resource as well based on the JSON you were trying to send. Here is an example var postData = { "records" :[ { "attributes" : {"type" : "Account", "referenceId" : "ref1"}, "name" : "SampleAccount1", "phone" : "1111111111", ...


1

You will need to build your own rest response wrapper for different possible scenarios. And if you do this way, salesforce will return the rest response regardlessly, so the method return type will be void. A over simplified example, @RestResource(urlMapping='/MyRestContextExample/*') global with sharing class MyRestContextExample { @HttpGet ...


4

I don't believe that this code can throw any system exceptions at all. If no Accounts are found, or if the input is nonsensical, the class will simply return an empty list. You need to add more code only if you want to provide a semantic response for the caller, such as "this request doesn't make sense", "no matching Account found", etc. In that case you ...


1

I have created a valid test class for your code above. However, this is not bulkified. Also I would note that you are returning a list of accounts, however, you only seem to be passing in 1 Account Id. The one error I can see you checking for is that the Id being passed in as the path, you may want to check to see if it is a valid Account Id. You could ...


1

So here is my setup in Salesforce: And then here is what I input into the OAuthDebugger form: So then when I clicked Send Request, it asked me to login, and then brought me to the authorize page: And then redirected me back to here: From there, you want to take the Auth Code that is received and "quickly" perform an grant_type=authorization_code call to ...


0

Create new custom REST API for account creation and use DML option to bypass Duplicate rule Database.DMLOptions dml = new Database.DMLOptions(); dml.DuplicateRuleHeader.allowSave = true; //Controlls bypass dml.DuplicateRuleHeader.runAsCurrentUser = true;


0

If understand the requirment correctly. You want to create "Connect" record only after "PartyId" is populated on Account. Create Account. Make callout to fetch "PartyId", which will be asynchronous call (Future Method). When "PartyId" is updated, create Connect Record (After Update on Account) If you want to create "Connect" record and then update "...


0

So I just tried exactly what you said and it worked. I added the custom attribute $Api.Session_ID and then I performed this callout in POSTMAN: GET /services/data HTTP/1.1 Host: {myidp}-dev-ed.my.salesforce.com Authorization: Bearer 00Df{redacted}GdahsD37VNi2Pg6wNIb7SeCUzyrmD. User-Agent: PostmanRuntime/7.19.0 Accept: */* Cache-Control: no-cache Host: {...


1

So the route POST /messaging/v1/email/definitions is for transactional messaging api, which is newer and doesn't have an UI yet. You would do all actions through the api. Why are you unable to use Content Builder Emails within a SOAP Call? Content Builder emails also have an email ID, which you can see in the UI:


6

Making a call to the {your sandbox domain}/services/data REST API will return a JSON response with all the available API versions. Here is the JSON response: [..., { "label" : "Winter '19", "url" : "/services/data/v44.0", "version" : "44.0" }, { "label" : "Spring '19", "url" : "/services/data/v45.0", "version" : "45.0" }, { "label" : "Summer '...


1

You can't pass null to Date.parse() method. So, you have to validate it before passing to the parse method. RestRequest restReq = RestContext.request; String dt = restReq.params.get('date'); if (String.isNotBlank(dt)) { Date d = Date.parse(dt); Record = [SELECT A,B,C,D WHERE E >= :d]; // OR Record = [SELECT A,B,C,D WHERE E >= :...


2

One of the common misconception is that connected app is required for every org. Connected app can be created in a developer environment and that's sufficient for the other orgs to authorize their Salesforce environment and you can store the necessary tokens. Workbench , Salesforce CLI and lot of third party apps use same method. They have a org where they ...


1

There's no way to query all contacts at the moment. You need to raise a support ticket to get an extract in a data extension. I described the reason and the way to proceed here. With this base data extension you can use further queries to isolate the contacts that you want to delete.


0

Unfortunately, no, folders aren't visible in Pardot API in any form.


1

This article describes how to get this information without API in a way that makes the data available in a data extension for further processing: Permanently remove Contacts or Subscribers and associated data from Contact Builder The results will be based on the All Contacts list and as such it will contain every billable contact in your MC account. As an ...


0

You cannot query from either Account_Division__r or Sales_Office__r. The __r notation is for relationships. These are the 'REST Resource(s) not found' If they are relationships to Contact, you would need to query the SObject(s) and use the Id from Contact to limit the query further. You need to replace __r with __c to access the SObjects.


2

If you have used Salesforce Workbench, you don't have to provide API key and API secret to log in. Workbench uses its own API key and Secret to log you in. All you provide is the Username password, but you dont provide them on workbench site, you provide them on Salesforce site. Workbench uses Oauth2 WebserverFlow Most 3rd Party uses Oauth Webserver flow to ...


2

So if your third party web service does not need to access Salesforce on a "per-user basis" (I.e. retrieve different results based on the user logging in), you could go with the JWT Flow. This is a good use case if you have an "integration user" that is doing the heavy lifting. If you need "per-user" access and want to not pass the credentials, you may want ...


Top 50 recent answers are included