You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/unified-profiles/create-sql-traits.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ Segment created three sample queries for Unified Profiles users to import common
9
9
-[Contacts](#contacts)
10
10
-[Leads](#leads)
11
11
12
-
To create a query that selects a different field, replace the `a`, `c`, or `l` with a list of fields to selectively import.
12
+
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`.
13
13
14
14
> success ""
15
15
> 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
18
18
19
19
To import Salesforce Accounts into Unified Profiles as Segment Unify profiles, create a RETL mapping with the following format.
20
20
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 billing country.
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.
22
22
23
23
```sql
24
24
SELECT
@@ -39,14 +39,14 @@ WHERE
39
39
40
40
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.
41
41
42
-
After running this query, 'phone' would be an Identity used for lookups in Unified Profiles.
42
+
After running this query, ‘phone’ can be used as an identifier used for lookups in Unified Profiles.
43
43
44
44
45
45
## Contacts
46
46
47
47
To import Salesforce Contacts into Unified Profiles as Segment Unify profiles, create a RETL mapping with the following format.
48
48
49
-
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 billing country.
49
+
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.
50
50
51
51
```sql
52
52
SELECT
@@ -67,13 +67,13 @@ WHERE
67
67
68
68
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.
69
69
70
-
After running this query, 'phone' would be an Identity used for lookups in Unified Profiles.
70
+
After running this query, ‘phone’ can be used as an identifier used for lookups in Unified Profiles.
71
71
72
72
## Leads
73
73
74
74
To import Salesforce Leads into Unified Profiles as Segment Unify profiles, create a RETL mapping with the following format.
75
75
76
-
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 billing country.
76
+
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.
77
77
78
78
```sql
79
79
SELECT
@@ -94,7 +94,7 @@ WHERE
94
94
95
95
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.
96
96
97
-
After running this query, 'phone' would be an Identity used for lookups in Unified Profiles.
97
+
After running this query, ‘phone’ can be used as an identifier used for lookups in Unified Profiles.
98
98
99
99
## Troubleshooting
100
100
If these queries don't return phone numbers in E.164 format, examine your existing data and change the REGEX patterns as appropriate.
0 commit comments