@ownerone/freshmarketer
TypeScript icon, indicating that this package has built-in type declarations

3.2.0 • Public • Published

Freshmarketer NPM Package

Install from the npm registry with your package manager:

npm install @ownerone/freshmarketer

Create a new instance of Freshservice API client

  • @param {string} domain - Domain of the Freshworks CRM instance
  • @param {string} apiKey - API key for the your domain in freshworks
import FreshworksService from '@ownerone/freshmarketer';
const FS = new FreshworksService({domain, apiKey});
FS.sendContactInfo(contactInfo: ContactInfo): Promise<Contact>
  • The sendContactInfo function adds a new contact

  • or updates the current one if such an email is already present in Freshworks CRM.

    • @param {string} email - email of the contact
    • @param {string} first_name - first name of the contact (optional)
    • @param {string} last_name - last Name of the contact (optional)
    • @param {CustomFieldsContact} custom_field - custom fields of the contact (optional):
    • @interface CustomFieldsContact
    • @property {string} cf_plan_prising- The plan prising from showroom (optional)
    • @property {string} cf_plan_registration- The plan registration from PA (optional)
    • @property {Date} cf_pa_date_reg- The name of the user (optional)
    • @property {number} cf_pa_id- The id user from PA (optional)
    • @property {Date} cf_app_date_reg- The date reg in application (optional)
    • @property {number} cf_app_id- - The id user from Application (optional)
    • @property {Date} cf_app_lastactivity_date- The date last activity user (optional)
    • @property {string} cf_subs_form- The subs form (optional)
    • @property {string} cf_current_tariff- The curennt tarrif (optional)
    • @property {Date} cf_waitlist_end- The date when waitlist end (optional)
    • @property {Date} cf_payment_date_wl- The date payment (optional)
    • @property {string} cf_status_wl- The status waitlist( optional)
    • @property {string} cf_myhub_status- The status MyHub (optional)
    • @property {string}cf_utm_full - The utm full (optional)
    • @property {string}cf_first_touch_campaign - The first touch campaign (optional)
    • @property {string}cf_first_touch_medium - The first touch medium (optional)
    • @property {string}cf_first_touch_source - The first touch source (optional)
    • @property {string}cf_first_touch_content - The first touch content (optional)
    • @property {string}cf_first_touch_term - The first touch term (optional)
    • @property {string}cf_subscription_campaign - The subscription campaign (optional)
    • @property {string}cf_subscription_medium - The subscription medium (optional)
    • @property {string}cf_subscription_source - The subscription source (optional)
    • @property {string}cf_subscription_content - The subscription content (optional)
    • @property {string}cf_subscription_term - The subscription term (optional)
    • @property {string}cf_registration_campaign - The registration campaign (optional)
    • @property {string}cf_registration_medium - The registration medium (optional)
    • @property {string}cf_registration_source - The registration source (optional)
    • @property {string} cf_registration_content - The registration content (optional)
    • @property {string}cf_registration_term - The registration term (optional)
    • @property {string}cf_last_touch_campaign - The last touch campaign (optional)
    • @property {string}cf_last_touch_medium - The last touch medium (optional)
    • @property {string}cf_last_touch_source - The last touch source (optional)
    • @property {string}cf_last_touch_content - The last touch content (optional)
    • @property {string}cf_last_touch_term - The last touch term (optional)
    export interface Contact {
    id: number;
    email: string;
    subscription_status: number;
    subscription_types: [];
    custom_field?: CustomFieldsContact;
    first_name: string | null;
    last_name: string | null;
    display_name: string | null;
    avatar: string | null;
    job_title: string | null;
    city: string | null;
    state: string | null;
    zipcode: string | null;
    country: string | null;
    emails: [
      {
        id: number | null;
        value: string | null;
        is_primary: boolean;
        label: string | null;
        _destroy: boolean;
      }
    ];
    time_zone: string | null;
    work_number: string | null;
    mobile_number: string | null;
    address: string | null;
    last_seen: string | null;
    lead_score: number | null;
    last_contacted: string | null;
    open_deals_amount: string | null;
    won_deals_amount: string | null;
    links: {
      conversations: string | null;
      timeline_feeds: string | null;
      document_associations: string | null;
      notes: string | null;
      tasks: string | null;
      appointments: string | null;
      reminders: string | null;
      duplicates: string | null;
      connections: string | null;
    };
    last_contacted_sales_activity_mode: string | null;
    created_at: Date;
    updated_at: Date | null;
    keyword: string | null;
    medium: string | null;
    last_contacted_mode: string | null;
    recent_note: string | null;
    won_deals_count: string | null;
    last_contacted_via_sales_activity: string | null;
    completed_sales_sequences: string | null;
    active_sales_sequences: string | null;
    web_form_ids: string | null;
    open_deals_count: string | null;
    last_assigned_at: Date | null;
    facebook: string | null;
    twitter: string | null;
    linkedin: string | null;
    is_deleted: boolean;
    team_user_ids: string | null;
    external_id: string | number | null;
    work_email: string | null;
    unsubscription_reason: string | null;
    other_unsubscription_reason: string | null;
    customer_fit: string | null;
    record_type_id: string | null;
    whatsapp_subscription_status: string | null;
    sms_subscription_status: number | null;
    last_seen_chat: string | null;
    first_seen_chat: string | null;
    locale: string | null;
    total_sessions: string | null;
    system_tags: string[];
    first_campaign: string | null;
    first_medium: string | null;
    first_source: string | null;
    last_campaign: string | null;
    last_medium: string | null;
    last_source: string | null;
    latest_campaign: string | null;
    latest_medium: string | null;
    latest_source: string | null;
    mcr_id: number | null;
    description: string | null;
    amb_subscription_status: string | null;
    phone_numbers: [];
    tags: string[];}

License

For open source projects, say how it is licensed.

Readme

Keywords

none

Package Sidebar

Install

npm i @ownerone/freshmarketer

Weekly Downloads

224

Version

3.2.0

License

ISC

Unpacked Size

21.6 kB

Total Files

4

Last publish

Collaborators

  • ooinazarov
  • apahomov
  • andrej-chubov
  • adavletshin