ores.iam.account_contact_information

Table of Contents

An account's address/phone/email/web page fields. The account's real name lives on ores_iam_accounts_tbl itself (full_name), not here — this entity is purely "how to reach them", not "who they are". One contact record per account (unlike party contact information, which allows several by contact_type — a person doesn't need a Legal/ Operations/Settlement/Billing split).

1. Flags

2. Columns

2.1. id

UUID uniquely identifying this contact information record.

Surrogate key for the account contact information record.

2.2. account_id

The account this contact information belongs to. One contact record per account.

References the parent account record.

uuid_gen()

2.3. street_line_1

First line of the street address.

Primary address line.

std::string("123 Test Street")

2.4. street_line_2

Second line of the street address.

Additional address line (suite, floor, etc.).

std::string("Suite 100")

2.5. city

City name.

City or town of the address.

std::string("London")

2.6. state

State or province.

State, province, or region.

std::string("")

2.7. country_code

ISO 3166-1 alpha-2 country code.

References the countries table (soft FK). The generator leaves it blank: the tenant-scoped countries table is unseeded in isolated test tenants, and an empty value skips the insert-trigger validation.

std::string("")
-- Paste block: doesn't fit soft_fk_validations (joins on id, not
-- an alpha-2 code column) or the Validations table
-- (ores_refdata_validate_country_fn only checks non-null/empty,
-- not existence).
-- Validate country_code (nullable, inline check against countries table)
if NEW.country_code is not null and NEW.country_code != '' then
    if not exists (
        select 1 from ores_refdata_countries_tbl
        where tenant_id = NEW.tenant_id
          and alpha2_code = NEW.country_code
          and valid_to = ores_utility_infinity_timestamp_fn()
    ) then
        raise exception 'Invalid country_code: %. Must be a valid ISO 3166-1 alpha-2 code.',
            NEW.country_code
            using errcode = '23503';
    end if;
end if;

2.8. postal_code

Postal or ZIP code.

Postal code for the address.

std::string("EC2V 8AS")

2.9. phone

Phone number.

Contact phone number in international format.

std::string("+44 20 7000 0000")

2.10. email

Email address.

Contact email address. May differ from the account's login email.

std::string("contact@example.com")

2.11. web_page

Web page URL.

Contact web page address.

std::string("https://example.com")

3. Artefact columns

The import identifies the owning account by account_username, a natural key. ores_iam_publish_account_contact_informations_from_dq_fn resolves it to account_id by looking the account up by username.

3.1. id

3.2. version

3.3. account_username

3.4. street_line_1

3.5. street_line_2

3.6. city

3.7. state

3.8. country_code

3.9. postal_code

3.10. phone

3.11. email

3.12. web_page

4. SQL

4.1. Flags

5. Foreign keys

5.1. account_id

The account table is now a codegen-bound entity (ores.iam.account), so the eventing integration test synthesizes an account parent row through the generated machinery: no parent_seed block is needed, and the auto-seeding writes the parent through the generated account generator and the context-carrying account repository.

6. Insert trigger

6.1. Validations

column validation_function

7. C++

7.1. Flags

7.2. Repository

7.3. Domain includes

#include <chrono>
#include <string>
#include <boost/uuid/uuid.hpp>

7.4. Entity includes

#include <string>
#include "sqlgen/Timestamp.hpp"
#include "sqlgen/PrimaryKey.hpp"

7.5. Conventions

7.6. Table display

column header
account_id Account
city City
country_code Country
phone Phone
email Email
modified_by Modified By
version Version

7.7. Presentation

Note: account_id is deliberately not exposed as a Detail field — like Party Contact Information's party_id, it's always known from the owning context (the account's own Contact Information tab/page in the notebook) and set programmatically before the dialog is shown, never user-chosen.

7.7.1. Detail fields

field label widget type is_key is_required placeholder flag_source combo_allow_blank combo_fetch combo_domain_type combo_fetch_include combo_fetch_fn combo_watcher_name combo_code_field combo_tooltip_field combo_sort_field combo_label combo_setter_pascal badge_key
id Id idEdit line_edit true true Contact id                          
street_line_1 Street Line 1 streetLine1Edit line_edit false false Enter street line 1                          
street_line_2 Street Line 2 streetLine2Edit line_edit false false Enter street line 2                          
city City cityEdit line_edit false false Enter city                          
state State stateEdit line_edit false false Enter state                          
country_code Country Code countryCodeCombo flagged_combo false false   country true fetch_country_codes                    
postal_code Postal Code postalCodeEdit line_edit false false Enter postal code                          
phone Phone phoneEdit line_edit false false Enter phone                          
email Email emailEdit line_edit false false Enter email                          
web_page Web Page webPageEdit line_edit false false Enter web page                          

7.7.2. Columns

enum_name field header type width
StreetLine1 street_line_1 Street string 180
City city City string 120
CountryCode country_code Country string 100
Phone phone Phone string 140
Email email Email string 180
Version version Version int 80
ModifiedBy modified_by Modified By string 120
RecordedAt recorded_at Recorded At timestamp 150

7.7.3. Icon columns

column accessor field1 field2
CountryCode country_flag_icon country_code  

8. Messages

The publish trigger is declared here beside the derived protocol, because it is a subject IAM owns and nothing else states it: the DQ artefact-type row that publishes onto it carries the same string in SQL, and a constant generated from here is what the registrar subscribes with. The separator is the one the other components' publish-from-dq subjects use, which is not this entity's protocol spelling; it is stated as it is on the wire.

8.1. publish_account_contact_informations_from_dq_request

/**
 * @brief The workflow step that publishes a DQ-cleared contact-information
 * bundle.
 *
 * A trigger rather than a request: the DQ publisher sends it and reads no
 * reply, so it states a subject and no response. Its body is the DQ artefact
 * the server-side function knows how to expand, which is why it declares no
 * fields.
 */

9. See also

Emacs 29.3 (Org mode 9.6.15)