Recued
Menu
← Back to recipes

Bookings from mail

by recued-core v1 10 views

Use “Bookings from mail” in Recued. Each reservation read from your email, a stay, a trip, a table or tickets, becomes a booking with its dates, price and confirmation code. A later email that moves or cancels it updates the booking. It starts when such an email arrives, not on a timer, and never changes a reservation.

How it works 64 steps

Inspect the data fetches, transforms, gates, and output this recipe runs.

Process (64 steps)
■ res defaults
Apply defaults
■ is_reservation all
Check if all conditions are true
■ start_text default
Apply default
■ end_text default
Apply default
■ start_chars string_length
Apply string_length
■ end_chars string_length
Apply string_length
■ start_is_day compare
Check if start chars equals 10
■ end_is_day compare
Check if end chars equals 10
■ start_instant date_parse
Parse start text as a date
■ start_day date_parse
Parse {{step.start_text}}T00:00:00 as a date
■ end_instant date_parse
Parse end text as a date
■ end_day date_parse
Parse {{step.end_text}}T00:00:00 as a date
■ start_ms ternary
Apply ternary
■ end_ms ternary
Apply ternary
■ has_start compare
Check if start ms exists
■ end_after_start all
Check if all conditions are true
■ assumed_hours ternary
Apply ternary
■ assumed_end_iso date_add
Add assumed hours hours to
■ assumed_end_ms date_parse
Parse assumed end iso as a date
■ known_or_assumed_end ternary
Apply ternary
■ slot_start ternary
Apply ternary
■ slot_end ternary
Apply ternary
■ is_cancelled compare
Check if res state equals cancelled
■ lifecycle ternary
Apply ternary
■ kind_word switch
Map res kind to one of: car, event, dining, lodging, transport, appointment
■ has_party compare
Check if res party size has data
■ party_part ternary
Apply ternary
■ has_location all
Check if all conditions are true
■ location_part ternary
Apply ternary
■ title truncate
Truncate res provider}} {{step kind word}}{{step party part}} ({{step res code}}){{step location part to a max length
■ has_amount all
Check if all conditions are true
■ amount_parts split
Split res amount into parts
■ cents default
Apply default
■ cents_digits string_length
Apply string_length
■ money_fits all
Check if all conditions are true
■ money ternary
Apply ternary
■ key replace
Replace text in mail-fact-booking:{{step.res.thing_id}}
■ keys default
Apply default
■ match_key default
Apply default
◆ listed core.work-entity.list
List work entity
■ made_here filter
Filter by condition
■ mine filter
Filter by condition
■ found count
Count items in mine
■ existing default
Apply default
■ lifecycle_ours compare
Check if existing lifecycle state is one of pending,confirmed,cancelled
■ is_live all
Check if all conditions are true
■ create_new all
Check if all conditions are true
■ title_changed compare
Check if existing title does not equal title
■ lifecycle_changed compare
Check if existing lifecycle state does not equal lifecycle
■ start_changed compare
Check if existing slot start at does not equal slot start
■ end_changed compare
Check if existing slot end at does not equal slot end
■ slot_differs any
Check if any of the conditions are true
■ slot_changed all
Check if all conditions are true
■ money_changed all
Check if all conditions are true
■ changed any
Check if any of the conditions are true
■ update_with_slot all
Check if all conditions are true
■ update_without_slot all
Check if all conditions are true
◆ created core.work-entity.booking.create
Create work entity booking
skip: step.create_new equal false
◆ updated_with_slot core.work-entity.booking.update
Update work entity booking
skip: step.update_with_slot equal false
◆ updated core.work-entity.booking.update
Update work entity booking
skip: step.update_without_slot equal false
■ updated_any any
Check if any of the conditions are true
■ outcome switch
Map create new}}/{{step updated any to one of: false/true, true/false
■ end_note ternary
Apply ternary
■ card to_summary
Format results as a summary card
▼
Output
summary card

Uses (3 operations)

Tasks & notes List work entity core.work-entity.list
Tasks & notes Create work entity booking core.work-entity.booking.create
Tasks & notes Update work entity booking core.work-entity.booking.update

Trust & control

What installing this recipe would let it do. Recued grants these permissions at install — review them there before approving.

What it's allowed to do

Read Tasks & notes core.work-entity.list read-only
Write Tasks & notes core.work-entity.booking.create external change
Write Tasks & notes core.work-entity.booking.update external change

Data it touches

SurfacesTasks & notes
Warehousedata.enddata.start

About

Tags

bookingsreservationstravelmailmail-factdeterministicpack:bookings

Details

64 steps recipe_id: track-booking-from-mail