Webhook

If you are setting up a custom integration, you've come to the right spot!  Each WebMerge Document and Data Route has a unique Merge URL that is a webhook endpoint.  This means we listen for an HTTP POST (name/value pairs) at this URL.

Here is an example Document Merge URL:

https://www.webmerge.me/merge/12345/abcde

 

Now, imagine our document has a few fields in it: Name, Email, Phone, and Address.  The next step will be to send the data for each field in the webhook request.  We're going to use name/value pairing to send the data.

Here is an example HTTP request:

POST https://www.webmerge.me/merge/12345/abcde

Name=John+Smith&Email=john.smith@email.com&Phone=123-555-7890&Address=123+S+Main

 

There are a few options (GET parameters) you can add to the Merge URL

  • test=1 : This will put the merge in "test mode" and not count against the merge credits

  • download=1 : This will return the document in HTTP response.  Simply save the response to save the document on your server

 

That should do it!

Have more questions? Submit a request

12 Comments

  • Avatar
    André Hess

    I'm sending a post message but I continuously get a message "Please send merge variable values" although my parameters are correct. https://www.webmerge.me/merge/122902/7xzvk8?resumen=hola&precio=22&metros=100

  • Avatar
    Jeremy Clarke

    Hi Andres,

    When sending your data via the URL (that's a GET request, not a POST), you need to use a "&_use_get=1" parameter in the URL too. This tells our system to look in the URL for your merge fields.

    Thanks!

  • Avatar
    Porter Davis

    Can I send JSON with multiple records to generate a combined document ? I only see JSON of a single record.

  • Avatar
    Jeremy Clarke

    Hi Porter,

    Yes, you can do that using a Data Route. In your data route rule, you'll select the "Repeat this rule" checkbox, then enter something like this in the box:

    {json_encode($products)}

    We will detect the JSON array and then for each item in the array, we'll populate a document.

    More info on data routes: https://support.webmerge.me/hc/en-us/articles/206527136-Combine-Multiple-Documents

    Thanks!

  • Avatar
    Tamalika Mukherjee

    If I am using the WebMerge App within Salesforce, will the document have a Form  URL that can be hosted on another website or proprietary software so that users who do not have access to Salesforce can use the form to enter data to create the merged documents?

    Edited by Tamalika Mukherjee
  • Avatar
    Jeremy Clarke

    Hi Tamalika,

    Yes, you can use our Data Capture feature to collect data for your documents!

  • Avatar
    Tamalika Mukherjee

    Thanks Jeremy! Where do I find the data capture feature within the WebMerge that has been installed in Salesforce via the AppExchange? Can you please help?

  • Avatar
    Jeremy Clarke

    Just click the "Data Capture" link at the top of the page in WebMerge :)

    More Info: https://support.webmerge.me/hc/en-us/articles/115001152786-Build-a-Data-Capture-form

  • Avatar
    Jon Field

    Jeremy, I can see how to use Merge URL parameters to pre-populate a data capture form, but is there a way of actually activating the merge document/route?
    I would like create an 'approval' button (URL) in our workflow that triggers creation and delivery of the document (not just opening of the prepopulated form)

    Edited by Jon Field
  • Avatar
    Jeremy Clarke

    Hi Jon,

    If you add "&_use_get=1" as another URL parameter, this will tell our system to use the URL parameters as your merge fields and to merge the document automatically.

    Is that what you're looking for?

  • Avatar
    Harry O'Brien

    Hi Jeremy,

    Trying to pass a webmerge field (QuoteID) to a webhook in Zapier, and then have that trigger the zap (which updates that same Quote in Salesforce). How to I deliver the QuoteID via the webhook and how do I retrieve the value in zapier to then search & find the correct Quote?

    This webhook delivery will fire after the webmerge doc is signed with DocuSign delivery (using advanced setting with DocuSign to hold other deliveries until signed).

    Not a developer so JSON etc is jargon to me! But I can edit code to match our variables and copy & paste it where needed. Able to help with this one?

    Looking at this page here https://share.getcloudapp.com/NQudJrm1

    Edited by Harry O'Brien
  • Avatar
    Christina Adkison

    Hello Harry,

    Thank you for your question!
    The easiest thing to do is just add the merge field to the Webhook URL (the Zapier URL) like this:
    https://zapier.com/path/to/webhook?QuoteID={$QuoteID}

    The "QuoteID" will be a field you can map in your SF mapping and it will get sent over to Zapier. Please be sure to check the options under "More Options" to send fields to the webhook.
    Please reach out if you have more questions! Thank you!
    Christina

Please sign in to leave a comment.
Powered by Zendesk