This lambda fetches estates from Immobilienscout24 or FlowFact, compares the results with Contentful and triggers webhooks if the estates in Contentful are not up to date.
-
Poll estates from portal (estate-portal-aggregator)
- Filter estates from portal (JSONPATH)
-
Poll estates from Contentful by
contentTypeId
with fieldssys.id
,sys.updatedAt
- Filter estates from Contentful (JSONPATH)
-
Compare estates by
internalID
(portal) /sys.id
(Contentful) andupdatedAt
(portal) /sys.updatedAt
(Contentful)-
Loop portal estates
-
If
internalID
not in Contentful (sys.id
)- Add portal estate to webhook payload - array property
created
- Add portal estate to webhook payload - array property
-
Else if
updatedAt
>sys.updatedAt
- Add portal estate to webhook payload - array property
updated
- Add portal estate to webhook payload - array property
-
-
Loop Contentful estates
- If
sys.id
not in portal (internalID
)- Add estate
sys.id
to webhook payload - array propertydeleted
- Add estate
- If
-
-
If
created
/updated
/deleted
length >= 1- POST webhook with payload
- CiCd
- Tests
- E2E Tests
- Scheduling
- development / production deploys