0.2.1 • Published 2 years ago
wbb-abavus v0.2.1
WBB Abavus
With this integration you can check waste schedule and create service requests in Abavus.
Blocks Provided
Provide a list of the blocks provided as part of this integration. This should be a list of block name, and its description.
| Block Name | Purpose |
|---|---|
| waste-collection-schedule-function | This will lookup waste schedule services based on provided postcode |
| missed-bins | This will lookup if there are any missed bins for the address requested |
| create-service-request-function | This will create a service request with questions provided |
| user-authentication-function | This will authenticate user based on email address and one more field configured in args and set person number in user session |
| missing-person-number | This will inform user if there is no person number in sessions |
| missing-required-args | This will inform user that required args from function are missing |
| no-uprn-found | This will inform user if no UPRN was found for the address |
| no-missed-bins | This will inform user it there aren't any missed bins |
Handler Names
The following handler names and their functions are available :
| Handler Name | Purpose |
|---|---|
| waste-collection-schedule | Searches for waste collections based on the user input postcode |
| user-authentication | It will authenticate user based on email address and configured and field configured in args |
| create-service-request | It will create service request based on set args |
| missed-bins | Search missed collections based on user input address |
Configuration Options
( Provide a list of the configuration options for each of the handlers mentioned above )
Within the function there are a number of options that can be set to configure the behaviour of the integration. The tables below show the settings that are available for each handler.
waste-collection-schedule
| Property | Required | Description |
|---|---|---|
| apiKey | true | A secure API key, provided by Abavus which will be used to authenticate all API calls |
| postcode_field | false | if set it will user another form, default is Abavus locality form |
| address1_field | false | if set it will be used as first line of address |
| address2_field | false | if set it will be used as second line of address |
| noWasteScheduleBlock | false | Overrides default no waste schedule block |
| startDateOfCollectionFormat | false | Overrides default date format MMMM D, YYYY. Should use date formats from moment.js library |
| nextCollectionString | false | Overrides default string for next collections: Your next collection will be on %%startDateOfCollection%%. To be %%subject%% |
| dateTemplate | false | Overrides default date format DD-MMM-YYYY HH:mm:ss to comply with the date format from API. Should use date formats from moment.js library |
| tryAgain | false | If set it will show the choice to try again when the block for arguments is missing will be thrown |
| resetForm | false | If set it will reset the form after tryAgain was clicked |
user-authentication
| Property | Required | Description |
|---|---|---|
| apiKey | true | A secure API key, provided by Abavus which will be used to authenticate all API calls |
| true | name of the form value which will set email | |
| matchFieldValue | true | form value of the field which will be matched against abavus user |
| matchFieldKey | true | abavus user property which matchFieldValue will be compared |
| nextResponse | false | ID of response to be triggered after this response, by default will jump to create-service-request |
create-service-request
| Property | Required | Description |
|---|---|---|
| apiKey | true | A secure API key, provided by Abavus which will be used to authenticate all API calls |
| abavus-person-number | true | Abavus user which going to raise the ticket |
| formCode | true | Abavus form code |
| catalogueCode | true | Abavus catalogue code |
| status | true | Abavus service request status |
| questionCodes | true | Valid question codes used to create service request |
| QUESTION_CODE | true | Valid Abavus question code will be the key and value should be form value field name |
| answerCodes | false | Valid answer codes used to create service request |
| ANSWER_CODE | false | Valid Abavus answer code will be the key and value should be form value field name |
missed-bins
| Property | Required | Description |
|---|---|---|
| apiKey | true | A secure API key, provided by Abavus which will be used to authenticate all API calls |
| postcode_field | false | if set it will user another form, default is Abavus locality form |
| address1_field | false | if set it will be used as first line of address |
| address2_field | false | if set it will be used as second line of address |
| noMissedBinBlock | false | Overrides default no missed bins block |
| startDateOfCollectionFormat | false | Overrides default date format MMMM D, YYYY. Should use date formats from moment.js library |
| missedCollectionString | false | Overrides default string for missed collections: Your missed collection was to %%subject%% on %%startDateOfCollection%%. |
| dateTemplate | false | Overrides default date format DD-MMM-YYYY HH:mm:ss to comply with the date format from API. Should use date formats from moment.js library |
| tryAgain | false | If set it will show the choice to try again when the block for arguments is missing will be thrown |
| resetForm | false | If set it will reset the form after tryAgain was clicked |