The landing page has no way to "know" that the value have been updated on the servers unless they poll the server or you have a mechanic that alerts the page.
The second does not exist, AFAIK, on Marketo. So that leaves the first method. So this means that you would have to have some JS that either refreshes the page after a few seconds, as I do not see in Marketo's client API's a way to poll lead data.
Sanford Whiteman may have a better idea.
Thanks for the update.
Could you please share any link or tell me how can i add JS on Lead page for auto refresh.
Unfortunately, I am not a JS developer, so I do not know
Deepak, I think I described adequately a working architecture. If this is for a commercial application, you should be able to find a dev who can implement this. It's not terrifically complex. You didn't answer the question at the top of my last post, though.
You are right our goal here is to enrich the lead data.
Currently we are doing POC how we can enrich the data in marketo, During our research we have found that Marketo provides a functionality called Webhook to consume a third party web services. so we have explored it and we have successfully enrich the lead data with the help of webhook and smart campaign.
The only issue which we are facing here is auto Refresh of lead page.
As you mentioned in your last post that there is a possibility to call third party web service from the client. so we are exploring it.
Could you please share any link or example which guide us to achieve the same goal from client side.
Reasons to use a webhook to enrich data submitted via a form (and thus data that is first available in the browser) are
- to conceal the results of the enrichment from from the end-user
- to conceal elements of your API from the end-user
- to give a long-running enrichment process more time to complete, for example by making an asynchronous call to your service and then fetching results later
Obviously  is not the case for you because you are trying to reveal the result of the enrichment to the user.
Doesn't seem like  is the case because you expect the enrichment response to be ready immediately.
That leaves . If it's critical for this to be a server-to-server call, OK. But if it's not, you're deliberately making your project harder for no reason. Take ReachForce SmartForms. This product enhances a web form to perform enrichment via Ajax before the form is submitted. In that case, the data from the enrichment service is available right in the browser. Why, specifically, can't you use that architecture?
What are the specific reasons you must access this web service as a webhook from the server, rather than calling it from the client, since the goal is to enrich the lead with new data that is in turn viewable by the lead?
If you absolutely cannot change the origin of the service calls, then you can meet the goal like this;
- use a publish/subscribe service like PubNub (or your own homebrew equivalent)
- the client connects and subscribes to a channel and passes the channel id with the form post
- when the data value is changed on the server, you publish the "is updated" event to the channel