7 Replies Latest reply on Jan 28, 2016 11:54 PM by Sanford Whiteman

    Auto Referesh Lead page.



      I am using Webhook to consume third party web service. I have added custom field of type check box in lead object. i have created a smart campaign which got triggered from new added custom field and then call the Webhook.I have mapped the response with lead fields.


      Once entire flow executed lead database got updated based on the mapping in Webhook. But user who triggered it from lead page is still not able to see the updated values until he/she manually refresh the page.


      Is there any way to refresh the lead page automatically. I mean with the help of Smart campaign or any other way?



      Best Regards,

      Deepak Kumar

        • Re: Auto Referesh Lead page.
          Grégoire Michel

          Hi Deepak,


          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.



            • Re: Auto Referesh Lead page.

              Hi Greg,


              Thanks for the update.


              Could you please share any link or tell me how can i add JS on Lead page for auto refresh.




                • Re: Auto Referesh Lead page.
                  Grégoire Michel

                  Hi Deepak,


                  Unfortunately, I am not a JS developer, so I do not know



                  • Re: Auto Referesh Lead page.
                    Sanford Whiteman

                    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.

                      • Re: Auto Referesh Lead page.

                        Hi Sanford,


                        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.




                          • Re: Auto Referesh Lead page.
                            Sanford Whiteman

                            Reasons to use a webhook to enrich data submitted via a form (and thus data that is first available in the browser) are


                            1. to conceal the results of the enrichment from from the end-user
                            2. to conceal elements of your API from the end-user
                            3. 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 [1] is not the case for you because you are trying to reveal the result of the enrichment to the user.


                            Doesn't seem like [3] is the case because you expect the enrichment response to be ready immediately.


                            That leaves [2]. 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?

                    • Re: Auto Referesh Lead page.
                      Sanford Whiteman

                      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