Contact Webhook V1

Behaviour

Each time a contact is created/updated, S-360 backend calls a given URL transmitting the contactNumber. Then it is up to the callee to call back S-360 with public webservices (for example : getContactData method).

URL and HTTP method

Designing the URL

The callee must provide an URL and an HTTP method (GET or POST). The URL must be of kind :

http(s)://mydomain.com/myeventualpath/whatever${contactNumber}whatever

When calling, S-360 will replace the placeholder ${contactNumber} by the effective contact number.

Examples :

http://dev.environment.com/${contactNumber}

http://dev.environment.com/path/?data=${contactNumber}

http://dev.environment.com/path/${contactNumber}?update=true

are valid URLs.

http://dev.environment.com/?data={contactNumber}

http://dev.environment.com/?data=${contact id}

Are NOT valid URLS (place holder syntax is not correct)

HTTP method

The URL may be called by GET or POST.

If GET, the presence of the place holder in the URL is mandatory.

If POST , it is also possible to setup an plain JSON payload containing the placeholder. In that case, S-360 will POST he payload to the URL, replacing the placeholder by the effective value.

Filter

A filter can be defined in the interface parameters to handle the transmission of the desire contacts. This filter parameter contains a string, based on ContactDataResult, like this below:

role=MEMBER;addresses(isMain).zipCode=13.* (only handle all the contacts which role is member and zipCode of main address is starting by 13)

Indicators(*).value=true (if the value of any indicator is true)

The delimiter of each condition in the filter is the character ";".

When a filter is added to the interface parameters, it's important to set the "Details" parameter (possible values in getContactData method).

Other setup options (authentication, passing contact email...)

There are none.

Setup in backend

  1. Ask for a proxy opening for the destination URL.
  2. In organization/tools/external interfaces create a new interface of type Firehose contact
  3. Paste the URL in the Url field
  4. Enter GET or POST as HTTP method
  5. Enter an eventual payload (see above)
  6. Save
  7. In the schedule menu, create a new schedule with a frequency fitting your needs and batch size of 60 (recommanded default value).