Contact Webhook V2

Behaviour

Each time a contact is created/updated, SecuTix backend calls a given URL transmitting the contactNumber. In this version, besides the call, all the information related to the contact provided by getContactData will be sent as a payload. That means no call is required from the callee.

URL and HTTP method

Designing the URL

The callee must provide an URL.

Any POST URL can be used in this webhook version.

HTTP method

The URL will be called using POST method. The output of getContactData method will be used as payload.

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...)

In this version, the interface can be configured to send different data of each contact. It should be a string of details, separated by commas, with possible values as per getContactData under "Details".

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. Select the desired details of the contact to be synced. By default: "GENERAL,ADDRESSES"
  5. Save
  6. In the schedule menu, create a new schedule with a frequency fitting your needs and batch size of 60 (recommanded default value).

Contact JSON example (with authorizations)

{
    "addresses": [{
            "billingAddress": true,
            "contactAddressId": 10228310728251,
            "countryCode": "ES",
            "documentFormattedAddress": "Mrs Liliana CALLEJON\nAvenida Chiquito de la Calzada\nportal 3\n18010 GRANADA\nSPAIN",
            "formattedAddress": "Avenida Chiquito de la Calzada\nportal 3\n18010 GRANADA\nSPAIN",
            "line1": "Avenida Chiquito de la Calzada",
            "line2": "portal 3",
            "localityCriteriaElements": [],
            "main": true,
            "name": "Main address",
            "normalizationRating": "UNKNOWN",
            "normalizationState": "TO_BE_NORMALIZED",
            "shippingAddress": true,
            "street1": "Avenida Chiquito de la Calzada",
            "street3": "portal 3",
            "town": "GRANADA",
            "zipCode": "18010"
        }
    ],
    "advantages": [],
    "authorizations": [{
            "allowed": true,
            "authorizationCode": "CNIL_O"
        }, {
            "allowed": false,
            "authorizationCode": "PARTNER"
        }
    ],
    "contactConnections": [],
    "contactCriteria": [],
    "contactId": 10228310728453,
    "contactNumber": "10912",
    "contactOrigin": {
        "code": "I_BOXOFFICE",
        "translations": {
            "de": "Schalter",
            "ja": "????????",
            "en": "Box office",
            "it": "Box office",
            "fr": "Guichet",
            "ca": "Taquilles",
            "es": "Taquillas"
        }
    },
    "contactQualities": [],
    "creationDate": "2020-10-13T08:57:11.875+00:00",
    "endValidityDate": "2999-12-30T23:00:00.000+00:00",
    "guest": false,
    "hasAdvantages": false,
    "hasWarning": false,
    "indicators": [],
    "individualContact": {
        "active": true,
        "addressSalutation": "Mrs",
        "alternativeEmails": [],
        "cellPhoneNumber": "+34655000321",
        "cellPhoneNumberVerified": false,
        "confidentialityLevelEnum": "FREE",
        "contactNumber": "10912",
        "countryCode": "ES",
        "email": "maria.liliana@yopmail.com",
        "endValidityDate": "2999-12-30T23:00:00.000+00:00",
        "guest": false,
        "handicapType": "HANDICAP/NONE",
        "individualBirthdate": "1989-08-09T22:00:00.000+00:00",
        "individualFirstname": "Liliana",
        "individualGender": "FEMALE",
        "individualLastname": "CALLEJON",
        "individualPreferredLanguage": "en",
        "individualTitle": "MRS",
        "letterSalutation": "Dear Madam",
        "prospect": true,
        "role": "PUBLIC",
        "zipCode": "18010"
    },
    "invalidatedContactQualities": [],
    "loginLastUpdateTime": "2020-10-13T09:40:29.002+00:00",
    "loginLastUpdateUser": "STX_JME",
    "role": "PUBLIC",
    "socialConnections": [],
    "state": "VALID",
    "structureContact": {
        "addressSalutation": "Mrs",
        "allContactNumbers": [],
        "alternativeEmails": [],
        "cellPhoneNumber": "+34655000321",
        "community": false,
        "confidentialityLevelEnum": "FREE",
        "letterSalutation": "Dear Madam",
        "prospect": true,
        "role": "PUBLIC"
    },
    "type": "INDIVIDUAL",
    "createdFrom": {
        "de": "Schalter",
        "ja": "????????",
        "en": "Box office",
        "it": "Box office",
        "fr": "Guichet",
        "ca": "Taquilles",
        "es": "Taquillas"
    }
}