Function messageContact

  • El contacto de un mensaje cuando viene poblado —el listado y el webhook—, y undefined cuando la API solo mando el identificador. Contrapartida de messageContactId.

    Parameters

    • message: Pick<Message, "contact_id" | "from_contact_id">

    Returns
        | undefined
        | {
            _id: string;
            creation_date: string;
            creator_keycloak_identifier?: string;
            extra_data?: {
                address?: string;
                boolean_property?: boolean;
                boolean_property2?: boolean;
                building?: string
                | number;
                city?: string;
                coords?: number[];
                country?: string;
                country_code?: string;
                door?: string | number;
                floor?: string | number;
                number?: string | number;
                number_property?: number;
                number_property2?: number;
                place_id?: string;
                state?: string;
                string_property?: string;
                string_property2?: string;
                zip_code?: string | number;
            };
            id_organization: string;
            last_contact_update: string;
            name?: string;
            profile_image?: string;
            social_identifiers: {
                _id: string;
                external_identifier?: string;
                last_send_date?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "email";
            }[];
        }

    • undefined
    • {
          _id: string;
          creation_date: string;
          creator_keycloak_identifier?: string;
          extra_data?: {
              address?: string;
              boolean_property?: boolean;
              boolean_property2?: boolean;
              building?: string | number;
              city?: string;
              coords?: number[];
              country?: string;
              country_code?: string;
              door?: string | number;
              floor?: string | number;
              number?: string | number;
              number_property?: number;
              number_property2?: number;
              place_id?: string;
              state?: string;
              string_property?: string;
              string_property2?: string;
              zip_code?: string | number;
          };
          id_organization: string;
          last_contact_update: string;
          name?: string;
          profile_image?: string;
          social_identifiers: {
              _id: string;
              external_identifier?: string;
              last_send_date?: string;
              social_network: | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord"
              | "email";
          }[];
      }
      • _id: string
      • creation_date: string

        Format: date-time

      • Optionalcreator_keycloak_identifier?: string

        The user who created the contact, when it was created from the panel instead of arriving from a network.

      • Optionalextra_data?: {
            address?: string;
            boolean_property?: boolean;
            boolean_property2?: boolean;
            building?: string | number;
            city?: string;
            coords?: number[];
            country?: string;
            country_code?: string;
            door?: string | number;
            floor?: string | number;
            number?: string | number;
            number_property?: number;
            number_property2?: number;
            place_id?: string;
            state?: string;
            string_property?: string;
            string_property2?: string;
            zip_code?: string | number;
        }
        • Optionaladdress?: string
        • Optionalboolean_property?: boolean
        • Optionalboolean_property2?: boolean
        • Optionalbuilding?: string | number
        • Optionalcity?: string
        • Optionalcoords?: number[]

          Longitude and latitude, in that order.

        • Optionalcountry?: string
        • Optionalcountry_code?: string
        • Optionaldoor?: string | number
        • Optionalfloor?: string | number
        • Optionalnumber?: string | number
        • Optionalnumber_property?: number
        • Optionalnumber_property2?: number
        • Optionalplace_id?: string
        • Optionalstate?: string
        • Optionalstring_property?: string
        • Optionalstring_property2?: string
        • Optionalzip_code?: string | number
      • id_organization: string
      • last_contact_update: string

        Format: date-time

        Last time the contact's profile was refreshed from the network.

      • Optionalname?: string
      • Optionalprofile_image?: string

        URL of the contact's avatar on the network. It belongs to the network and it can stop working.

      • social_identifiers: {
            _id: string;
            external_identifier?: string;
            last_send_date?: string;
            social_network:
                | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "email";
        }[]