Skip to content

Commit 318780d

Browse files
committed
Merge branch 'create-sql-traits' of https://github.com/segmentio/segment-docs into create-sql-traits
2 parents facde85 + 4288c51 commit 318780d

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/unified-profiles/create-sql-traits.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: RETL Scripts For Importing Salesforce Objects Into Unified Profiles in Flex
2+
title: RETL Queries for Importing Salesforce Objects Into Unified Profiles in Flex
33
hidden: true
44
---
5-
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.
5+
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.
66

77
Segment created three sample queries for Unified Profiles users to import common Salesforce objects:
88
- [Accounts](#accounts)
@@ -18,9 +18,9 @@ To selectively import columns, replace the `a*`, `c*`, or `l*` with a list of fi
1818

1919
To import Salesforce Accounts into Unified Profiles as Segment Unify profiles, create a RETL mapping with the following format.
2020

21-
Replace `<database_name.account_table>` 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.
21+
Replace `<database_name.account_table>` 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.
2222

23-
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.**
23+
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.**
2424

2525
``` sql
2626
SELECT
@@ -48,7 +48,9 @@ To import Salesforce Contacts into Unified Profiles as Segment Unify profiles, c
4848

4949
Replace `<database_name.contact_table>` 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.
5050

51-
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.**
51+
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.
52+
53+
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.**
5254

5355
``` sql
5456
SELECT
@@ -75,7 +77,9 @@ To import Salesforce Leads into Unified Profiles as Segment Unify profiles, crea
7577

7678
Replace `<database_name.lead_table>` 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.
7779

78-
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.**
80+
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.
81+
82+
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.**
7983

8084
``` sql
8185
SELECT

0 commit comments

Comments
 (0)