Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.morf.health/docs/llms.txt

Use this file to discover all available pages before exploring further.

images/intercom.svg

How Morf Looks Up Contacts

Intercom has multiple identifiers that can be used to determine if a contact already exists and should be updated:
  • id (Intercom ID, e.g. 663d7c334b898bb9d9a4322d) — unique
  • external_id (User ID) — unique
  • email — not unique
At least one of these is required to update a contact. email is required to create a contact.

Lookup logic

If the Morf profile already has an Intercom ID, that contact will be updated — a new contact will not be created. If the Morf profile does not have an Intercom ID and email is configured:
  • Multiple contacts found by email:
    • If external_id is configured, Morf chooses the contact whose external_id matches the Morf profile ID and associates it.
    • If external_id is not configured, or no match is found, Morf chooses the most recently created contact with a matching email and associates it.
  • No contact found by email: Morf creates a new Intercom contact and associates it with the Morf profile.
Once found or created, the contact is updated with all configured fields.
If two Morf profiles are merged (by email or phone number), the resulting profile may have multiple associated Intercom IDs. If the action is configured to update external_id and a different Intercom contact already exists with that external_id, the active Intercom ID and the external_id in Intercom are mismatched. Reach out to Morf support to resolve this.

Parameters

Action
Parameters
{
  "$result_object_key": {
    "android_app_name": "Intercom",
    "android_app_version": "5.0.0",
    "android_device": "Pixel 3",
    "android_last_seen_at": "2024-07-12T16:00:00Z",
    "android_os_version": "10",
    "android_sdk_version": "28",
    "avatar": "https://example.org/128Wash.jpg",
    "browser": "Chrome",
    "browser_language": "en-US",
    "browser_version": "80.0.3987.132",
    "companies": {
      "data": [
        {
          "id": "123",
          "type": "company",
          "url": "/contacts/5ba682d23d7cf92bef87bfd4/companies"
        }
      ],
      "has_more": true,
      "total_count": 100,
      "url": "/contacts/5ba682d23d7cf92bef87bfd4/companies"
    },
    "created_at": "2024-07-12T16:00:00Z",
    "custom_attributes": {
      "contact_preference": "email",
      "name": "John Doe"
    },
    "email": "joe@example.com",
    "email_domain": "example.com",
    "external_id": "f3b87a2e09d514c6c2e79b9a",
    "formatted_phone": "+1123456789",
    "has_hard_bounced": true,
    "id": "5ba682d23d7cf92bef87bfd4",
    "ios_app_name": "Intercom",
    "ios_app_version": "5.0.0",
    "ios_device": "iPhone 11",
    "ios_last_seen_at": "2024-07-12T16:00:00Z",
    "ios_os_version": "13.3.1",
    "ios_sdk_version": "13.3.1",
    "language_override": "en",
    "last_contacted_at": "2024-07-12T16:00:00Z",
    "last_email_clicked_at": "2024-07-12T16:00:00Z",
    "last_email_opened_at": "2024-07-12T16:00:00Z",
    "last_replied_at": "2024-07-12T16:00:00Z",
    "last_seen_at": "2024-07-12T16:00:00Z",
    "location": {
      "city": "Dublin",
      "country": "Ireland",
      "region": "Dublin",
      "type": "location"
    },
    "marked_email_as_spam": true,
    "name": "John Doe",
    "notes": {
      "data": [
        {
          "id": "123",
          "type": "note",
          "url": "/contacts/5ba682d23d7cf92bef87bfd4/notes"
        }
      ],
      "has_more": true,
      "total_count": 100,
      "url": "/contacts/5ba682d23d7cf92bef87bfd4/notes"
    },
    "os": "Mac OS X",
    "owner_id": 123,
    "phone": "+1123456789",
    "role": "user",
    "signed_up_at": "2024-07-12T16:00:00Z",
    "social_profiles": {
      "data": [
        {
          "name": "Facebook",
          "type": "social_profile",
          "url": "http://x.com/foo"
        }
      ]
    },
    "tags": {
      "data": [
        {
          "id": "123",
          "name": "Managed by Morf",
          "type": "tag",
          "url": "/contacts/5ba682d23d7cf92bef87bfd4/tags"
        }
      ],
      "has_more": true,
      "total_count": 100,
      "url": "/contacts/5ba682d23d7cf92bef87bfd4/tags"
    },
    "type": "contact",
    "unsubscribed_from_emails": true,
    "updated_at": "2024-07-12T16:00:00Z",
    "workspace_id": "ecahpwf5"
  }
}
{
  "$result_object_key": {
    "android_app_name": "The name of the Android app which the contact is using.",
    "android_app_version": "The version of the Android app which the contact is using.",
    "android_device": "The Android device which the contact is using.",
    "android_last_seen_at": "The time when the contact was last seen on an Android device.",
    "android_os_version": "The version of the Android OS which the contact is using.",
    "android_sdk_version": "The version of the Android SDK which the contact is using.",
    "avatar": "URL of the avatar",
    "browser": "The name of the browser which the contact is using.",
    "browser_language": "The language set by the browser which the contact is using.",
    "browser_version": "The version of the browser which the contact is using.",
    "companies": {
      "data": {
        "id": "ID of object",
        "type": "Type of object",
        "url": "URL to get more"
      },
      "has_more": "Has more companies",
      "total_count": "Count of companies",
      "url": "URL to get more"
    },
    "created_at": "The time when the contact was created.",
    "custom_attributes": "The custom attributes which are set for the contact.",
    "email": "The contact's email.",
    "email_domain": "The contact's email domain.",
    "external_id": "The unique identifier for the contact which is provided by the Client.",
    "formatted_phone": "The contacts phone number normalized to the E164 format",
    "has_hard_bounced": "Whether the contact has had an email sent to them hard bounce.",
    "id": "The unique identifier for the contact which is given by Intercom.",
    "ios_app_name": "The name of the iOS app which the contact is using.",
    "ios_app_version": "The version of the iOS app which the contact is using.",
    "ios_device": "The iOS device which the contact is using.",
    "ios_last_seen_at": "The last time the contact used the iOS app.",
    "ios_os_version": "The version of iOS which the contact is using.",
    "ios_sdk_version": "The version of the iOS SDK which the contact is using.",
    "language_override": "A preferred language setting for the contact used by the Intercom Messenger even if their browser settings change.",
    "last_contacted_at": "The time when the contact was last messaged.",
    "last_email_clicked_at": "The time when the contact last clicked a link in an email.",
    "last_email_opened_at": "The time when the contact last opened an email.",
    "last_replied_at": "The time when the contact last messaged in.",
    "last_seen_at": "The time when the contact was last seen (either where the Intercom Messenger was installed or when specified manually).",
    "location": {
      "city": "City",
      "country": "Country",
      "region": "Region",
      "type": "Type of object"
    },
    "marked_email_as_spam": "Whether the contact has marked an email sent to them as spam.",
    "name": "The contacts name.",
    "notes": {
      "data": {
        "id": "ID of object",
        "type": "Type of object",
        "url": "URL to get more"
      },
      "has_more": "Has more notes",
      "total_count": "Count of notes",
      "url": "URL to get more"
    },
    "os": "The operating system which the contact is using.",
    "owner_id": "The id of an admin that has been assigned account ownership of the contact.",
    "phone": "The contacts phone.",
    "role": "The role of the contact.",
    "signed_up_at": "The time specified for when a contact signed up.",
    "social_profiles": {
      "data": {
        "name": "Type of social media",
        "type": "Type of object",
        "url": "Profile URL"
      }
    },
    "tags": {
      "data": {
        "id": "ID of object",
        "name": "Name of tag",
        "type": "Type of object",
        "url": "URL to get more"
      },
      "has_more": "Has more tags",
      "total_count": "Count of tags",
      "url": "URL to get more"
    },
    "type": "The type of object.",
    "unsubscribed_from_emails": "Whether the contact is unsubscribed from emails.",
    "updated_at": "The time when the contact was last updated.",
    "workspace_id": "The id of the workspace which the contact belongs to."
  }
}

Result Object Field Details

You can use the result of the action’s data as inputs to downstream workflow actions. Each fetch action requires a result object key to be specified which will nest the action’s result data inside the downstream data context in the Workflow. Here we demonstrate how to refer to this data using the prefix $result_object_key.
Contact
Fetch Action Response Object