Triggering a new case via REST API

1
0
-1

I am looking for options to trigger a new case by receiving an email to a gmail address.

I have seen a couple of questions on triggering a new case by email. The recommendation was to use an ESB (Camel or Mule). What about API REST?

Preliminary I think about the following sequence:

  1. Connect Gmail with Zapier
  2. Once Gmail receives an email - trigger a webhook from Zapier to Bonita BPM
  3. Bonita BPM receives the webhook and triggers a new case

I would appreciate any thoughts and considerations regarding this matter.

1 answer

1
+3
-1
This one is the BEST answer!

I don't know Zapier but using a REST API call to create a new case is possible. You can search on REST bpm API documentation page for "Start a process using an instantiation contract". As you will also need to deal with authentication I recommend to read the REST API overview documentation.

Comments

Submitted by Sean McP on Mon, 01/11/2016 - 14:30

It looks easy enough. I've read the documentation...

Your webhook would be javascript such as a post as here:

Obviously you would Login, do your work and then Logout...

// post

fetch('http://httpbin.org/post', { method: 'POST', body: 'a=1' })
    .then(function(res) {
        return res.json();
    }).then(function(json) {
        console.log(json);
    });

Submitted by shpak.serhiy on Thu, 01/14/2016 - 09:43

Thank you, Sean.

Notifications