Predefined Calculation: Bartec Collective - Registered For Assisted Collection

Summary

This formula will verify if a given property is registered for Assisted Collections in Bartec Collective using the 'Assisted Collection Description' setting in the Bartec Collective Integrations Hub Page.

Setup

The formula requires the Assisted Collection Description under Settings > Integrations > Bartec Collective > Settings to be set. The value entered into the setting must match the description of the attribute as configured in Bartec Collective.

Assisted Collection Description setting

Inputs

This formula requires 1 input to be passed through to it, the UPRN of the property to check assisted collection against.

Assisted Collection Description setting

The mapped value must come from an address lookup question, using the propery_identifier variable option.

Return values

Value Description
Yes If the property is registered for assisted collection.
No If the property is not registered for assisted collection.
error If there is an error when trying to query Bartec Collective via the API.

Note: return values are case sensitive

Caching

When using this formula the calls to the Bartec Collective API are cached for the time specified in Settings > Integrations > Bartec Collective > Settings under the Cache Timeout setting.

Assisted Collection Description setting

Setting the Cache Timeout to 0 Minutes/Hours will disable caching on this formula.

Formula Logic

  1. A check is made to see if the integration has been enabled in the Settings > Integrations page. If the integration is not enabled the formula returns error.

  2. A call is made to Premises_Attributes_Get passing in the UPRN input which returns all the attributes set on a property

  3. If no attributes are returned from the API the formula will return error

  4. For all the attributes that are returned, the attribute description is lowercased and compared to Assisted Collection Description value from the settings (also lowercased). When a match is found the formula will return Yes, if no match is found No is returned.

results matching ""

    No results matching ""