Munchkin Success response | Community
Skip to main content
bibin_davis
Level 1
November 27, 2019
Question

Munchkin Success response

  • November 27, 2019
  • 1 reply
  • 2223 views

How to identify that munchkin.munchkinFunction('associateLead', { 'Email': email }, hash); GET service is successful? Does this function has a callback using Javascript GET ? 

Need to write some code on success of this API.  

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SanfordWhiteman
Level 10
November 27, 2019

There's no callback, but more important: the completion of this GET doesn't mean the current session cookie is associated when the response is complete. It's merely queued for association, as with a form post. (The association could happen as little as 1ms later, but regardless, the point is it isn't synchronous, and it certainly may take a few seconds under load.)

The GET can only fail of the hash key is wrong (which is de facto impossible for server code you control) or if the Munchkin server is down (or inaccessible due to Tracking Protection, but you'd know you didn't have the global Munchkin object in this case). What exactly are you trying to do when the association (or attempt to associate) is complete? What's the biz logic here?

bibin_davis
Level 1
November 29, 2019

I need to run a service call after the success of the munchkin response.

SanfordWhiteman
Level 10
November 29, 2019

You haven't explained your use case. The "success" of the response is just the HTTP 200. It doesn't mean the association is complete. Please be specific about what you're trying to accomplish.