From c0b55ce5fc5559d06a83f28b71f9310f5dfedc99 Mon Sep 17 00:00:00 2001 From: forstisabella <92472883+forstisabella@users.noreply.github.com> Date: Sun, 3 Mar 2024 13:48:43 -0500 Subject: [PATCH 1/8] add retl scripts --- src/unified-profiles/create-sql-traits.md | 99 +++++++++++++++++++++++ src/unified-profiles/segment-for-flex.md | 14 +--- 2 files changed, 101 insertions(+), 12 deletions(-) create mode 100644 src/unified-profiles/create-sql-traits.md diff --git a/src/unified-profiles/create-sql-traits.md b/src/unified-profiles/create-sql-traits.md new file mode 100644 index 0000000000..ff4965035d --- /dev/null +++ b/src/unified-profiles/create-sql-traits.md @@ -0,0 +1,99 @@ +--- +title: RETL Scripts For Importing Salesforce Objects Into Unified Profiles +hidden: true +--- +Unified Profiles users can convert Salesforce objects with US phone number patterns (typically (555) 231-7654) into Segment Unify profiles with E.164 phone number formats (+15552317654) to support Unified Profiles lookup. + +Segment created three sample queries for Unified Profiles users to import common Salesforce objects: +- [Accounts](#accounts) +- [Contacts](#contacts) +- [Leads](#leads) + +To create a query that selects a different field, replace the `a`, `c`, or `l` with a list of fields to selectively import. + +## Accounts + +To import Salesforce Accounts into Unified Profiles as Segment Unify profiles, create a RETL mapping with the following format. + +Replace `` with your database name and account table, `PHONE` with the name of the column in your warehouse that contains phone numbers, and `BILLING_COUNTRY` with the name of the column in your warehouse that contains the account's billing country. + +``` sql +SELECT + a.*, + CASE + WHEN a.PHONE REGEXP '^(\\([0-9]{3}\\) [0-9]{3}-[0-9]{4})$' AND a.BILLING_COUNTRY = 'US' + THEN CONCAT('+1', REGEXP_REPLACE(a.PHONE, '[^0-9]','')) + WHEN a.BILLING_COUNTRY != 'US' + THEN REGEXP_REPLACE(a.PHONE, '[^0-9]','') + ELSE a.PHONE + END as phone, +FROM + a +WHERE + a.PHONE IS NOT NULL + AND a.BILLING_COUNTRY IS NOT NULL; +``` + +Salesforce objects have several phone number-related fields. In this example query, the “PHONE” column is the primary contact phone number and what you import as the Profile’s 'phone' trait. The other phone fields for Salesforce Accounts are PersonHomePhone, PersonMobilePhone, & PersonOtherPhone, and could be substituted for "PHONE" in this query. + +After running this query, 'phone' would be an Identity used for lookups in Unified Profiles. + + +## Contacts + +To import Salesforce Contacts into Unified Profiles as Segment Unify profiles, create a RETL mapping with the following format. + +Replace `` with your database name and account table, `PHONE` with the name of the column in your warehouse that contains phone numbers, and `BILLING_COUNTRY` with the name of the column in your warehouse that contains the contact's billing country. + +``` sql +SELECT + c.*, + CASE + WHEN c.PHONE REGEXP '^(\\([0-9]{3}\\) [0-9]{3}-[0-9]{4})$' AND c.BILLING_COUNTRY = 'US' + THEN CONCAT('+1', REGEXP_REPLACE(c.PHONE, '[^0-9]','')) + WHEN c.BILLING_COUNTRY != 'US' + THEN REGEXP_REPLACE(c.PHONE, '[^0-9]','') + ELSE c.PHONE + END as phone, +FROM + c +WHERE + c.PHONE IS NOT NULL + AND c.BILLING_COUNTRY IS NOT NULL; +``` + +Salesforce objects have several phone number-related fields. In this example query, the “PHONE” column is the primary contact phone number and what you import as the Profile’s 'phone' trait. The other phone fields for Salesforce Contacts are HomePhone, MobilePhone, & OtherPhone, and could be substituted for "PHONE" in this query. + +After running this query, 'phone' would be an Identity used for lookups in Unified Profiles. + +## Leads + +To import Salesforce Leads into Unified Profiles as Segment Unify profiles, create a RETL mapping with the following format. + +Replace `` with your database name and lead table, `PHONE` with the name of the column in your warehouse that contains phone numbers, and `BILLING_COUNTRY` with the name of the column in your warehouse that contains the lead's billing country. + +``` sql +SELECT + l.*, + CASE + WHEN l.PHONE REGEXP '^(\\([0-9]{3}\\) [0-9]{3}-[0-9]{4})$' AND l.BILLING_COUNTRY = 'US' + THEN CONCAT('+1', REGEXP_REPLACE(l.PHONE, '[^0-9]','')) + WHEN l.BILLING_COUNTRY != 'US' + THEN REGEXP_REPLACE(l.PHONE, '[^0-9]','') + ELSE l.PHONE + END as phone, +FROM + l +WHERE + l.PHONE IS NOT NULL + AND l.BILLING_COUNTRY IS NOT NULL; +``` + +Salesforce objects have several phone number-related fields. In this example query, the “PHONE” column is the primary contact phone number and what you import as the Profile’s 'phone' trait. The other phone fields for Salesforce Leads are HomePhone, MobilePhone, & OtherPhone, and could be substituted for "PHONE" in this query. + +After running this query, 'phone' would be an Identity used for lookups in Unified Profiles. + +## Troubleshooting +If these queries don't return phone numbers in E.164 format, examine your existing data and change the REGEX patterns as appropriate. + +Because the format in which an international phone number is saved in Salesforce largely depends on how users input them into the system, Salesforce administrators can add form validation methods, like input field validation rules with REGEX functions, to guide users to input phone numbers in specific formats. These form validation methods may impact the format of the phone numbers in your database, and might require you to change the REGEX patterns in the provided queries. \ No newline at end of file diff --git a/src/unified-profiles/segment-for-flex.md b/src/unified-profiles/segment-for-flex.md index 04ad76102e..2677e80990 100644 --- a/src/unified-profiles/segment-for-flex.md +++ b/src/unified-profiles/segment-for-flex.md @@ -38,12 +38,7 @@ You can add additional data sources after completing the setup process.
5. Give your destination a name and enter the account credentials for a user that has read and write permissions. Click **Save**. 6. After you've given your destination a name and entered your credentials, click **Next**. 7. On the Getting started with Segment page, click **Define Model**. -8. Create a SQL query that defines your model. After you've created a model, Segment uses your model to map data to your Reverse ETL destinations.
Segment recommends a model with the following format: - -``` sql -SELECT * FROM salesforce_flex_unify.accounts -``` - +8. [Create a SQL query that defines your model](/docs/unified-profiles/create-sql-traits){:target="_blank"}. After you've created a model, Segment uses your model to map data to your Reverse ETL destinations.
  1. Click **Preview** to return 10 records from your warehouse. When you've verified that your records return as expected, click **Next**. @@ -64,12 +59,7 @@ SELECT * FROM salesforce_flex_unify.accounts 3. Give your destination a name and enter the account credentials for a user that has read and write permissions. Click **Save**. 4. After you've given your destination a name and entered your credentials, click **Next**. 5. On the *Getting started with Segment* page, click **Define Model**. -6. Create a SQL query that defines your model. After you've created a model, Segment uses your model to map data to your Reverse ETL destinations.
    Segment recommends a model with the following format: - -``` sql -SELECT * FROM flex_unify.accounts -``` - +6. [Create a SQL query that defines your model](/docs/unified-profiles/create-sql-traits){:target="_blank"} After you've created a model, Segment uses your model to map data to your Reverse ETL destinations.
    1. Click **Preview** to return 10 records from your warehouse. When you've verified that your records return as expected, click **Next**. From a868f91564eb787fa3589894ecdc3ec5df91579b Mon Sep 17 00:00:00 2001 From: forstisabella <92472883+forstisabella@users.noreply.github.com> Date: Sun, 3 Mar 2024 13:54:02 -0500 Subject: [PATCH 2/8] [netlify-build] --- src/unified-profiles/create-sql-traits.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unified-profiles/create-sql-traits.md b/src/unified-profiles/create-sql-traits.md index ff4965035d..626fd65794 100644 --- a/src/unified-profiles/create-sql-traits.md +++ b/src/unified-profiles/create-sql-traits.md @@ -96,4 +96,4 @@ After running this query, 'phone' would be an Identity used for lookups in Unifi ## Troubleshooting If these queries don't return phone numbers in E.164 format, examine your existing data and change the REGEX patterns as appropriate. -Because the format in which an international phone number is saved in Salesforce largely depends on how users input them into the system, Salesforce administrators can add form validation methods, like input field validation rules with REGEX functions, to guide users to input phone numbers in specific formats. These form validation methods may impact the format of the phone numbers in your database, and might require you to change the REGEX patterns in the provided queries. \ No newline at end of file +Because the format in which an international phone number is saved in Salesforce largely depends on how users input them into the system, Salesforce administrators can add form validation methods, like input field validation rules with REGEX functions, to guide users to input phone numbers in specific formats. These form validation methods may impact the format of the phone numbers in your database, and might require you to change the REGEX patterns in the provided queries. From 2514de70782b1fa79e16e09edf6067e23c120465 Mon Sep 17 00:00:00 2001 From: forstisabella <92472883+forstisabella@users.noreply.github.com> Date: Mon, 4 Mar 2024 12:22:43 -0500 Subject: [PATCH 3/8] add note w/ default db nme [netlify-build] --- src/unified-profiles/create-sql-traits.md | 3 +++ src/unified-profiles/segment-for-flex.md | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/unified-profiles/create-sql-traits.md b/src/unified-profiles/create-sql-traits.md index 626fd65794..3e5cb55a16 100644 --- a/src/unified-profiles/create-sql-traits.md +++ b/src/unified-profiles/create-sql-traits.md @@ -11,6 +11,9 @@ Segment created three sample queries for Unified Profiles users to import common To create a query that selects a different field, replace the `a`, `c`, or `l` with a list of fields to selectively import. +> success "" +> Segment creates a default database table (`segment_flex_unify`) during the [Segment for Flex](/docs/unified-profiles/segment-for-flex/){:target="_blank”} setup process. + ## Accounts To import Salesforce Accounts into Unified Profiles as Segment Unify profiles, create a RETL mapping with the following format. diff --git a/src/unified-profiles/segment-for-flex.md b/src/unified-profiles/segment-for-flex.md index 2677e80990..bf1c82f04f 100644 --- a/src/unified-profiles/segment-for-flex.md +++ b/src/unified-profiles/segment-for-flex.md @@ -176,6 +176,6 @@ Your Segment for Flex workspace has the following entitlements: href="/docs/unified-profiles/connect-a-workspace" icon="api.svg" title="Connect an Existing Workspace to Flex" - description="Flex customers without an existing Segment workspace that includes a Unify space can obtain a Segment for Flex workspace and configure a Unify space. A Segment for Flex workspace provides limited access to Segment." + description="Flex customers with an existing Segment workspace that has a Unify space can connect their Unify space to Flex." %} From 96406acde91acc953f02a2990329ab5ae85a8e05 Mon Sep 17 00:00:00 2001 From: forstisabella <92472883+forstisabella@users.noreply.github.com> Date: Mon, 4 Mar 2024 12:27:20 -0500 Subject: [PATCH 4/8] Apply suggestions from code review [netlify-build] --- src/unified-profiles/create-sql-traits.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/unified-profiles/create-sql-traits.md b/src/unified-profiles/create-sql-traits.md index 3e5cb55a16..ea4775a7ed 100644 --- a/src/unified-profiles/create-sql-traits.md +++ b/src/unified-profiles/create-sql-traits.md @@ -9,7 +9,7 @@ Segment created three sample queries for Unified Profiles users to import common - [Contacts](#contacts) - [Leads](#leads) -To create a query that selects a different field, replace the `a`, `c`, or `l` with a list of fields to selectively import. +To selectively import columns, replace the `a*`, `c*`, or `l*` with a list of fields to selectively import. For example, if you wanted to only import the ID, NAME, and ADDRESS fields for your Accounts, you'd replace `a*` with `a.ID, a.NAME, a.ADDRESS`. > success "" > Segment creates a default database table (`segment_flex_unify`) during the [Segment for Flex](/docs/unified-profiles/segment-for-flex/){:target="_blank”} setup process. @@ -18,7 +18,7 @@ To create a query that selects a different field, replace the `a`, `c`, or `l` w To import Salesforce Accounts into Unified Profiles as Segment Unify profiles, create a RETL mapping with the following format. -Replace `` with your database name and account table, `PHONE` with the name of the column in your warehouse that contains phone numbers, and `BILLING_COUNTRY` with the name of the column in your warehouse that contains the account's billing country. +Replace `` with your database name and account table, `PHONE` with the name of the column in your warehouse that contains phone numbers, and `BILLING_COUNTRY` with the name of the column in your warehouse that contains the account's country. ``` sql SELECT @@ -39,14 +39,14 @@ WHERE Salesforce objects have several phone number-related fields. In this example query, the “PHONE” column is the primary contact phone number and what you import as the Profile’s 'phone' trait. The other phone fields for Salesforce Accounts are PersonHomePhone, PersonMobilePhone, & PersonOtherPhone, and could be substituted for "PHONE" in this query. -After running this query, 'phone' would be an Identity used for lookups in Unified Profiles. +After running this query, ‘phone’ can be used as an identifier used for lookups in Unified Profiles. ## Contacts To import Salesforce Contacts into Unified Profiles as Segment Unify profiles, create a RETL mapping with the following format. -Replace `` with your database name and account table, `PHONE` with the name of the column in your warehouse that contains phone numbers, and `BILLING_COUNTRY` with the name of the column in your warehouse that contains the contact's billing country. +Replace `` with your database name and account table, `PHONE` with the name of the column in your warehouse that contains phone numbers, and `BILLING_COUNTRY` with the name of the column in your warehouse that contains the contact's country. ``` sql SELECT @@ -67,13 +67,13 @@ WHERE Salesforce objects have several phone number-related fields. In this example query, the “PHONE” column is the primary contact phone number and what you import as the Profile’s 'phone' trait. The other phone fields for Salesforce Contacts are HomePhone, MobilePhone, & OtherPhone, and could be substituted for "PHONE" in this query. -After running this query, 'phone' would be an Identity used for lookups in Unified Profiles. +After running this query, ‘phone’ can be used as an identifier used for lookups in Unified Profiles. ## Leads To import Salesforce Leads into Unified Profiles as Segment Unify profiles, create a RETL mapping with the following format. -Replace `` with your database name and lead table, `PHONE` with the name of the column in your warehouse that contains phone numbers, and `BILLING_COUNTRY` with the name of the column in your warehouse that contains the lead's billing country. +Replace `` with your database name and lead table, `PHONE` with the name of the column in your warehouse that contains phone numbers, and `BILLING_COUNTRY` with the name of the column in your warehouse that contains the lead's country. ``` sql SELECT @@ -94,7 +94,7 @@ WHERE Salesforce objects have several phone number-related fields. In this example query, the “PHONE” column is the primary contact phone number and what you import as the Profile’s 'phone' trait. The other phone fields for Salesforce Leads are HomePhone, MobilePhone, & OtherPhone, and could be substituted for "PHONE" in this query. -After running this query, 'phone' would be an Identity used for lookups in Unified Profiles. +After running this query, ‘phone’ can be used as an identifier used for lookups in Unified Profiles. ## Troubleshooting If these queries don't return phone numbers in E.164 format, examine your existing data and change the REGEX patterns as appropriate. From 253dbe8eed9ebe35fe45cb287e27e1a54b4cd16d Mon Sep 17 00:00:00 2001 From: forstisabella <92472883+forstisabella@users.noreply.github.com> Date: Mon, 4 Mar 2024 17:02:37 -0500 Subject: [PATCH 5/8] final editing pass [netlify-build] --- src/unified-profiles/create-sql-traits.md | 28 +++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/unified-profiles/create-sql-traits.md b/src/unified-profiles/create-sql-traits.md index ea4775a7ed..a168458ed0 100644 --- a/src/unified-profiles/create-sql-traits.md +++ b/src/unified-profiles/create-sql-traits.md @@ -1,8 +1,8 @@ --- -title: RETL Scripts For Importing Salesforce Objects Into Unified Profiles +title: RETL Scripts For Importing Salesforce Objects Into Unified Profiles in Flex hidden: true --- -Unified Profiles users can convert Salesforce objects with US phone number patterns (typically (555) 231-7654) into Segment Unify profiles with E.164 phone number formats (+15552317654) to support Unified Profiles lookup. +Unified Profiles in Flex users can convert Salesforce objects with US phone number patterns (typically (555) 231-7654) into Segment Unify profiles with E.164 phone number formats (+15552317654) to support Unified Profiles lookup. Segment created three sample queries for Unified Profiles users to import common Salesforce objects: - [Accounts](#accounts) @@ -16,9 +16,11 @@ To selectively import columns, replace the `a*`, `c*`, or `l*` with a list of fi ## Accounts -To import Salesforce Accounts into Unified Profiles as Segment Unify profiles, create a RETL mapping with the following format. +To import Salesforce Accounts into Unified Profiles as Segment Unify profiles, create a RETL mapping with the following format. -Replace `` with your database name and account table, `PHONE` with the name of the column in your warehouse that contains phone numbers, and `BILLING_COUNTRY` with the name of the column in your warehouse that contains the account's country. +Replace `` with your database name and account table, `PHONE` with the name of the column in your warehouse that contains phone numbers, and `BILLING_COUNTRY` with the name of the column in your warehouse that contains the account's country. In this example query, the `PHONE` column is the primary contact phone number and what you import as the Profile’s 'phone' trait. + +The other phone fields for Salesforce Accounts are PersonHomePhone, PersonMobilePhone, & PersonOtherPhone, and could be substituted for `PHONE` in this query. **You can only import one phone number field as the identifier used for lookups in Flex.** ``` sql SELECT @@ -37,16 +39,16 @@ WHERE AND a.BILLING_COUNTRY IS NOT NULL; ``` -Salesforce objects have several phone number-related fields. In this example query, the “PHONE” column is the primary contact phone number and what you import as the Profile’s 'phone' trait. The other phone fields for Salesforce Accounts are PersonHomePhone, PersonMobilePhone, & PersonOtherPhone, and could be substituted for "PHONE" in this query. - -After running this query, ‘phone’ can be used as an identifier used for lookups in Unified Profiles. +After running this query, you can use ‘phone’ for lookups in Unified Profiles. ## Contacts To import Salesforce Contacts into Unified Profiles as Segment Unify profiles, create a RETL mapping with the following format. -Replace `` with your database name and account table, `PHONE` with the name of the column in your warehouse that contains phone numbers, and `BILLING_COUNTRY` with the name of the column in your warehouse that contains the contact's country. +Replace `` with your database name and account table, `PHONE` with the name of the column in your warehouse that contains phone numbers, and `BILLING_COUNTRY` with the name of the column in your warehouse that contains the contact's country. + +Salesforce objects have several phone number-related fields. In this example query, the `PHONE` column is the primary contact phone number and what you import as the Profile’s 'phone' trait. The other phone fields for Salesforce Contacts are HomePhone, MobilePhone, & OtherPhone, and could be substituted for `PHONE` in this query. **You can only import one phone number field as the identifier used for lookups in Flex.** ``` sql SELECT @@ -65,9 +67,7 @@ WHERE AND c.BILLING_COUNTRY IS NOT NULL; ``` -Salesforce objects have several phone number-related fields. In this example query, the “PHONE” column is the primary contact phone number and what you import as the Profile’s 'phone' trait. The other phone fields for Salesforce Contacts are HomePhone, MobilePhone, & OtherPhone, and could be substituted for "PHONE" in this query. - -After running this query, ‘phone’ can be used as an identifier used for lookups in Unified Profiles. +After running this query, you can use ‘phone’ for lookups in Unified Profiles. ## Leads @@ -75,6 +75,8 @@ To import Salesforce Leads into Unified Profiles as Segment Unify profiles, crea Replace `` with your database name and lead table, `PHONE` with the name of the column in your warehouse that contains phone numbers, and `BILLING_COUNTRY` with the name of the column in your warehouse that contains the lead's country. +Salesforce objects have several phone number-related fields. In this example query, the `PHONE` column is the primary contact phone number and what you import as the Profile’s 'phone' trait. The other phone fields for Salesforce Leads are HomePhone, MobilePhone, & OtherPhone, and could be substituted for `PHONE` in this query. **You can only import one phone number field as the identifier used for lookups in Flex.** + ``` sql SELECT l.*, @@ -92,9 +94,7 @@ WHERE AND l.BILLING_COUNTRY IS NOT NULL; ``` -Salesforce objects have several phone number-related fields. In this example query, the “PHONE” column is the primary contact phone number and what you import as the Profile’s 'phone' trait. The other phone fields for Salesforce Leads are HomePhone, MobilePhone, & OtherPhone, and could be substituted for "PHONE" in this query. - -After running this query, ‘phone’ can be used as an identifier used for lookups in Unified Profiles. +After running this query, you can use ‘phone’ for lookups in Unified Profiles. ## Troubleshooting If these queries don't return phone numbers in E.164 format, examine your existing data and change the REGEX patterns as appropriate. From 3df8758a4d70b5cf53afd87f3b020417be5297f1 Mon Sep 17 00:00:00 2001 From: forstisabella <92472883+forstisabella@users.noreply.github.com> Date: Mon, 4 Mar 2024 17:10:04 -0500 Subject: [PATCH 6/8] Apply suggestions from code review [netlify-build] --- src/unified-profiles/create-sql-traits.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/unified-profiles/create-sql-traits.md b/src/unified-profiles/create-sql-traits.md index a168458ed0..42f4343c7e 100644 --- a/src/unified-profiles/create-sql-traits.md +++ b/src/unified-profiles/create-sql-traits.md @@ -1,8 +1,8 @@ --- -title: RETL Scripts For Importing Salesforce Objects Into Unified Profiles in Flex +title: RETL Queries for Importing Salesforce Objects Into Unified Profiles in Flex hidden: true --- -Unified Profiles in Flex users can convert Salesforce objects with US phone number patterns (typically (555) 231-7654) into Segment Unify profiles with E.164 phone number formats (+15552317654) to support Unified Profiles lookup. +You can use the following SQL queries to convert Salesforce objects with US phone number patterns (typically (555) 231-7654) into Segment Unify profiles with E.164 phone number formats (+15552317654). Unified Profiles in Flex requires phone numbers used for profile lookups to be in E.164 format. Segment created three sample queries for Unified Profiles users to import common Salesforce objects: - [Accounts](#accounts) From 4288c51faa2319091cf2148833d471824dfa6a87 Mon Sep 17 00:00:00 2001 From: forstisabella <92472883+forstisabella@users.noreply.github.com> Date: Mon, 4 Mar 2024 17:23:41 -0500 Subject: [PATCH 7/8] Apply suggestions from code review [netlify-build] --- src/unified-profiles/create-sql-traits.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/unified-profiles/create-sql-traits.md b/src/unified-profiles/create-sql-traits.md index 42f4343c7e..b65bebd02e 100644 --- a/src/unified-profiles/create-sql-traits.md +++ b/src/unified-profiles/create-sql-traits.md @@ -18,9 +18,9 @@ To selectively import columns, replace the `a*`, `c*`, or `l*` with a list of fi To import Salesforce Accounts into Unified Profiles as Segment Unify profiles, create a RETL mapping with the following format. -Replace `` with your database name and account table, `PHONE` with the name of the column in your warehouse that contains phone numbers, and `BILLING_COUNTRY` with the name of the column in your warehouse that contains the account's country. In this example query, the `PHONE` column is the primary contact phone number and what you import as the Profile’s 'phone' trait. +Replace `` with your database name and account table, `PHONE` with the name of the column in your warehouse that contains phone numbers, and `BILLING_COUNTRY` with the name of the column in your warehouse that contains the account's country. In this sample query, the `PHONE` column is the primary contact phone number and what you import as the Profile’s 'phone' trait. -The other phone fields for Salesforce Accounts are PersonHomePhone, PersonMobilePhone, & PersonOtherPhone, and could be substituted for `PHONE` in this query. **You can only import one phone number field as the identifier used for lookups in Flex.** +The other phone fields for Salesforce Accounts are PersonHomePhone, PersonMobilePhone, & PersonOtherPhone, and could be substituted for `PHONE` in this query. **You can only import one phone number field as the identifier used for lookups in Unified Profiles.** ``` sql SELECT @@ -48,7 +48,9 @@ To import Salesforce Contacts into Unified Profiles as Segment Unify profiles, c Replace `` with your database name and account table, `PHONE` with the name of the column in your warehouse that contains phone numbers, and `BILLING_COUNTRY` with the name of the column in your warehouse that contains the contact's country. -Salesforce objects have several phone number-related fields. In this example query, the `PHONE` column is the primary contact phone number and what you import as the Profile’s 'phone' trait. The other phone fields for Salesforce Contacts are HomePhone, MobilePhone, & OtherPhone, and could be substituted for `PHONE` in this query. **You can only import one phone number field as the identifier used for lookups in Flex.** +Salesforce objects have several phone number-related fields. In this sample query, the `PHONE` column is the primary contact phone number and what you import as the Profile’s 'phone' trait. + +The other phone fields for Salesforce Contacts are HomePhone, MobilePhone, & OtherPhone, and could be substituted for `PHONE` in this query. **You can only import one phone number field as the identifier used for lookups in Unified Profiles.** ``` sql SELECT @@ -75,7 +77,9 @@ To import Salesforce Leads into Unified Profiles as Segment Unify profiles, crea Replace `` with your database name and lead table, `PHONE` with the name of the column in your warehouse that contains phone numbers, and `BILLING_COUNTRY` with the name of the column in your warehouse that contains the lead's country. -Salesforce objects have several phone number-related fields. In this example query, the `PHONE` column is the primary contact phone number and what you import as the Profile’s 'phone' trait. The other phone fields for Salesforce Leads are HomePhone, MobilePhone, & OtherPhone, and could be substituted for `PHONE` in this query. **You can only import one phone number field as the identifier used for lookups in Flex.** +Salesforce objects have several phone number-related fields. In this sample query, the `PHONE` column is the primary contact phone number and what you import as the Profile’s 'phone' trait. + +The other phone fields for Salesforce Leads are HomePhone, MobilePhone, & OtherPhone, and could be substituted for `PHONE` in this query. **You can only import one phone number field as the identifier used for lookups in Unified Profiles.** ``` sql SELECT From facde85c1005487a9a94f6c5856eccad2902d11d Mon Sep 17 00:00:00 2001 From: forstisabella <92472883+forstisabella@users.noreply.github.com> Date: Mon, 4 Mar 2024 17:37:15 -0500 Subject: [PATCH 8/8] {netlify-build] --- src/unified-profiles/create-sql-traits.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unified-profiles/create-sql-traits.md b/src/unified-profiles/create-sql-traits.md index a168458ed0..085caa61ee 100644 --- a/src/unified-profiles/create-sql-traits.md +++ b/src/unified-profiles/create-sql-traits.md @@ -99,4 +99,4 @@ After running this query, you can use ‘phone’ for lookups in Unified Profile ## Troubleshooting If these queries don't return phone numbers in E.164 format, examine your existing data and change the REGEX patterns as appropriate. -Because the format in which an international phone number is saved in Salesforce largely depends on how users input them into the system, Salesforce administrators can add form validation methods, like input field validation rules with REGEX functions, to guide users to input phone numbers in specific formats. These form validation methods may impact the format of the phone numbers in your database, and might require you to change the REGEX patterns in the provided queries. +Because the format in which an international phone number is saved in Salesforce largely depends on how users input them into the system, Salesforce administrators can add form validation methods, like input field validation rules with REGEXP functions, to guide users to input phone numbers in specific formats. These form validation methods may impact the format of the phone numbers in your database, and might require you to change the REGEXP patterns in the provided queries.