Skip to main content
8 votes
Accepted

How to read REQUEST body

Since the types can be mixed, you need to use either the JSONParser (I would not recommend this) or JSON.deserializeUntyped. Here's the latter method: Map<String, Object> params = (Map<...
sfdcfox's user avatar
  • 502k
6 votes
Accepted

Xero WebHook Validation

Better late than never but I recently have webhooks up and running in Salesforce. You effectively need to: Sign the payload received from Xero using HMACSHA256 and using the key provided in the ...
benedwards44's user avatar
4 votes

lead import from facebook using webhooks

Speaking just to the Security Review test credentials issue - you have to provide all credentials the security review team will need to test your app end-to-end. This usually minimally includes the ...
Brian Miller's user avatar
  • 5,242
4 votes
Accepted

Webhook endpoint resulting in error: FORBIDDEN You do not have access to the Apex class named

First (before I explain how I fixed my situation), for anyone coming to this post to resolve a similar issue, the first thing you need to do is verify that you have given your site guest user access ...
Neil's user avatar
  • 73
3 votes
Accepted

Best way to manage webhooks

Your webhook callout will work OK with small numbers of records, for the immediate need. I think the other parts of your question can be answered by looking at declarative features. How do I ...
Matt and Neil's user avatar
3 votes
Accepted

Validating Hubspot webhook request signature in Apex

Looks to me like the process for validating the v3 signature (and it appears that you are using v3 based on the header you're trying to get) is different. HMAC-SHA256 instead of SHA256 url decode the ...
Derek F's user avatar
  • 64k
3 votes

How to read REQUEST body

You can use deserializeUntyped(jsonString) here as below. Refer to the example details on the documentation. Map<String, Object> myMap = (Map<String, Object>) JSON.deserializeUntyped(req....
Jayant Das's user avatar
  • 30.7k
3 votes

Possible to Authenticate an incoming Webhook for use with Post REST Service

The best secure way would be to use a Connected App and Server-Server flow It is always better to authenticate to Salesforce and reach into Salesforce using a connected app. However, as you pointed ...
Mohith Shrivastava's user avatar
3 votes
Accepted

Expose public Webhook listener from Managed Package

I don't belive there's a way to do this without creating a site and giving the Site Guest User Profile access to the Apex class that implements the webservice. I use this pattern a lot, but keep the ...
Matt Lacey's user avatar
  • 25.8k
3 votes
Accepted

Asynchronously call-in to a Managed Package

I would engineer this to leverage a Connected App, using a server-to-server authentication flow. Salesforce supports OAuth 2 JWT flow for this purpose. The Connected App should not be packaged (I know ...
Phil W's user avatar
  • 38.1k
3 votes

POST Calling Apex Method not displaying showing in Dev Console

Click on Debug, and uncheck Show My Current Logs Only. You'll get logs from other sessions, not just the current browser session.
sfdcfox's user avatar
  • 502k
3 votes

SJSS function to get raw body data

A solution for this has been found. You will want to use Platform.Request.GetPostData() to retrieve the raw POST body content of incoming request.
Jim Nagorka's user avatar
2 votes

How to return response to a Shopify Webhook?

You have to set statuscode and response text blob in RestContext.response RestResource(urlMapping='/ShopSf/Odr') global class ShopifyRestClass { @HttpPost global static void ...
Pranay Jaiswal's user avatar
2 votes
Accepted

How do I tie Event Notification Service notifications to events in MC

You would leverage this field: Composite ID:273670.60.61.213995105 This is to be JOBID.LISTID.BATCHID.SUBID
EazyE's user avatar
  • 8,722
2 votes
Accepted

Can we still create unauthenticated webhooks?

You can, but you have to be incredibly careful. I've been going through the process of testing and modifying such implementations for our customers. Approach 1 Write your REST class as without ...
Aidan's user avatar
  • 14k
2 votes
Accepted

How to Sync TYPEFORM to SFMC Data Extension via Webhooks

Below is the solution to this, to pass data from Typeform application to SFMC using WebHooks, you basically need to use SSJS to parse JSON. Let me know if this helps. This code should be executed in a ...
nobhunil dutta's user avatar
1 vote

How to decrypt an encrypted incoming webhook payload

Data is a base-64 encoded string, and the secret key appears to be a 256-bit private symmetric key (just guessing, based on the length). As such, you're going to need to first use EncodingUtil....
sfdcfox's user avatar
  • 502k
1 vote

Access Named Credentials with Guest User

Based on the response from @cropredy I enabled Create and Read Permissons for the User External Credentials Object and the Guest User can now access the Named Credential!
Jeff Callahan's user avatar
1 vote

Creating a new case from a 3rd party alert via webhook

Well, there's good news and bad news. The good news is that you can create a Case with a single POST request. This example, creating a new Account is pretty much what you're looking for. Substitute ...
Derek F's user avatar
  • 64k
1 vote

Best way to manage webhooks

Instead of directly using triggers try using change data capture and write a subscriber trigger on CDC. As CDC subscriber triggers will work after the data is committed it doesn't block your DML ...
bnthsrikanth's user avatar
1 vote

accces to rest resource

You should add the permission to the apex class and every other resource needed (i.e. Object Permission, Field-Level Security) to the Guest User. To open the Guest User profile start from Setup, ...
RubenDG's user avatar
  • 9,582
1 vote
Accepted

How to generate Access token dynamically and use in POST Webhook call from Salesforce?

You'll use a Named Credentials to generate the OAuth session, then use that in your webhook callout code by replacing the current URL https://app.onetrust.com/ with the Named Credential name callout:...
sfdcfox's user avatar
  • 502k
1 vote

How to embed one lightning web component in another web component

This error is coming because your are trying to deploy a component in the org for which dependecy is not available yet in the org. LifeCycleParent includes LifeCycleChild component and is dependent on ...
Ankur Gupta's user avatar
1 vote

Accepting a callback via REST from ScheduleOnce

It sounds like what you are asking about is a custom Apex REST service. Keep in mind it looks like OnceHub has a Salesforce integration. I would attempt to exhaust that option first before even ...
nbrown's user avatar
  • 4,112
1 vote

How to Sync TYPEFORM to SFMC Data Extension via Webhooks

There is small issue with the above solution, if we leave any of the input field blank and submit the form, the submission won't enter the Data Extension, as the above solution checks for exactly 0 to ...
nobhunil dutta's user avatar
1 vote

POST Calling Apex Method not displaying showing in Dev Console

@sfdcfox is correct that Show Current Logs Only is an option that needs to be unchecked. However, you also need to do a couple things. Make sure your site that is being referenced by the webhook has ...
thinker's user avatar
  • 1,482
1 vote

Can we create platform event dynamically without using UI?

Platform events are migrated the same as normal Custom Objects. See Migrate Platform Event Definitions with Metadata API for specific details. Basically, you use the Metadata API, and you retrieve and ...
sfdcfox's user avatar
  • 502k
1 vote

How to create lead via webhook javascript firebase

This is something I did recently using Angular, so I can answer this. Download Web2LeadForm: It would look something like this. <form action="https://test.salesforce.com/servlet/servlet.WebToLead?...
Pranay Jaiswal's user avatar
1 vote
Accepted

Marketing Cloud Data Extension Web Hook

Salesforce Marketing Cloud just started supporting Webhooks with the January 2019 Release using Event Notification Service (ENS) Use the Event Notification Service (ENS) API to receive notifications ...
Spencer Curtis's user avatar
1 vote

Marketing Cloud Data Extension Web Hook

Not in a simple/OOTB way. If you really need it you would need a couple of work-arounds like for example use the contactevent https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/...
Doug's user avatar
  • 783

Only top scored, non community-wiki answers of a minimum length are eligible