How to run salesforce "watch record field" module imediately?

“Why do I have to set a schedule time of minimum 1 min,
for the field watch record module? It’s supposed to trigger whenever the Salesforce system detects an update in the field, regardless of the version (free or paid). Is there something I need to configure to ensure the Flow runs instantly? I’m uncertain, and I’m hoping someone can provide guidance. My primary concern is that, when utilizing the field watch record feature, it should initiate immediately upon that specific field’s update.”

Hello @Swapnil,

Not all “Watch” modules are instant.
In cases such as this, it’s a polling trigger where it periodically checks for changes and keeps track internally of what is considered a new change since the last check.

To get the instant effect, you would need to find somewhere in Salesforce to call a Make Webhook and send information that Make needs to act on the change(s).

2 Likes

Hi @Swapnil,

Expanding on what Donald has said, the Watch Record Field is a polling trigger. That means it’s a scheduled operation to “check on”/ or “pull” data from an external service.

If you want your scenario to run as soon as things change on the external service, that external service will need to “push” a notification to Make that an event has occurred, and the data about that event - this is what we call an incoming Webhook.

If you do not see the word “INSTANT” on the trigger module when you’re selecting a trigger module in your scenario, that’s NOT a Webhook, so you won’t be able to recieve real-time updates from the external service.

According to this thread in the Salesforce forum, Salesforce has a way to send the updates immediately to Make. If you manage to create such a Webhook on your Salesforce instance, then you can use the “Custom Webhook” module to handle the event.

For more information about Trigger types in Make, see Types of Modules and Webhooks sections of the Make help center.

TL;DR: See if your app has an “Instant” or “Webhook” trigger in Make. If not, check if the third-party service has a feature that can send out a webhooks when content is created/updated - and then you can point it to a “Custom Webhook” trigger in your scenario.

2 Likes

There’s a (slightly) simpler way to create outbound webhooks from Salesforce that you can use with the Make Custom Webhook module to get the same behaviour as an Instant Trigger.

In Salesforce Flow, you can set up an Outbound Message and trigger that to be sent under your desired conditions.

This sends an XML packet via Webhook, and expects a special XML packet in response, so there are a couple of special things you need to do.

In Make, you’ll have a Custom Webhook - that needs to be followed immediately by a Webhook Response module to send the special XML acknowledgement. You then need to parse the XML from the Custom Webhook to turn it into fields that Make modules can use.

It will look something like this:

The Webhook Response module needs to return a status 200 and with a body of:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Body>
    <notificationsResponse xmlns="http://soap.sforce.com/2005/09/outbound">
      <Ack>true</Ack>
    </notificationsResponse>
  </soapenv:Body>
</soapenv:Envelope>

4 Likes

Thanks for the guidance, David. The one change I made to the outbound message was to make sure that it sends the session ID. I re-triggered it and checked off the running scenario. The web hook had not captured any data. The status after the Salesforce outbound message is sent is “The request was accepted. Waiting for data.”

I then changed the web hook name to generate a new URL and pasted that URL into the outbound message is salesforce, then re-triggered it. The scenario again has the status of “The request was accepted. Waiting for data.”.

Salesforce continues to show the status of “(403)Forbidden”

I have further tested this at pipe dream, using their API tester. The result is the attached screenshot:

The status for the outbound message sent to pipe dream is:
org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.

So, pipeline acknowledges the receipt of the salesforce data, and Make does not.

The WSDL description and schema look like this:

<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://soap.sforce.com/2005/09/outbound" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ent="urn:enterprise.soap.sforce.com" xmlns:ens="urn:sobject.enterprise.soap.sforce.com" targetNamespace="http://soap.sforce.com/2005/09/outbound">

<types>

<schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:enterprise.soap.sforce.com">

<!-- Our simple ID Type -->

<simpleType name="ID">

<restriction base="xsd:string">

<length value="18"/>

<pattern value="[a-zA-Z0-9]{18}"/>

</restriction>

</simpleType>

</schema>

<schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:sobject.enterprise.soap.sforce.com">

<import namespace="urn:enterprise.soap.sforce.com"/>

Does this provide any useful data? Any ideas?

Thanks!

Hey @IT - welcome to the Community!

Could you share the details of the Make scenario you’re using?