From 88201fb736a6ce4f83ad14c05241a05ad89d9984 Mon Sep 17 00:00:00 2001 From: Sam Shull Date: Thu, 9 Feb 2023 15:38:44 -0600 Subject: [PATCH 01/12] [CHA-1585] add user deletion, cart clearing, email under traits --- .../destinations/catalog/sailthru-v2/index.md | 47 ++++++++++++++++++- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/src/connections/destinations/catalog/sailthru-v2/index.md b/src/connections/destinations/catalog/sailthru-v2/index.md index 3b2c13e403..387a0d55f0 100644 --- a/src/connections/destinations/catalog/sailthru-v2/index.md +++ b/src/connections/destinations/catalog/sailthru-v2/index.md @@ -48,6 +48,7 @@ Screen events require a `url` property. If Sailthru receives a Screen call witho Send [Identify](/docs/connections/spec/identify) calls to to create or update a Sailthru profile for any identified user on your site. +Email address passed at top level: ```js analytics.identify("assigned-userId", { "name": "Stephen Noel", @@ -57,6 +58,21 @@ analytics.identify("assigned-userId", { }); ``` +Email passed under context.traits: +```js +analytics.identify("assigned-userId", { + "name": "Stephen Noel", + "plan": "premium", + "logins": 5 +}, +{ + "traits": {"email": "snoel@sailthru.com"} +} +); +``` + +**Note:** Sailthru will also search for the email address in the identify call() under context.traits if not provided at the top-level. + ### Track Send [Track](/docs/connections/spec/track) calls to: @@ -65,6 +81,7 @@ Send [Track](/docs/connections/spec/track) calls to: * record abandoned carts via “Product Added” and “Product Removed” events * subscribe users via “Subscribed” events * trigger Lifecycle Optimizer journeys with all other events +* delete users via “User Deleted” events Sailthru automatically creates and maps custom fields from Segment. @@ -78,6 +95,20 @@ analytics.track("Subscribed", { }); ``` +#### Delete a User + +For user deletion, the email needs to be included in the userId or context.traits track call, in a call like the following: + +```js +analytics.track(“User Deleted”, {userId:"xxxxxx@example.com" }) +``` + +```js +analytics.track("User Deleted", {}, {"traits":{"email": "xxxxxxx@example.com"}}) +``` + +If the user exists, it will be removed from both Segment and Sailthru. + #### Record a Purchase Record purchases in Sailthru wih the `Order Completed` event to send order confirmation messages, personalize messaging, and create purchase-related audiences. @@ -118,7 +149,9 @@ analytics.track("Order Completed", { #### Update Cart Send `Product Added` and `Product Removed` Track events for Sailthru's abandoned cart messaging to enable the Cart Abandonment entry in Lifecycle Optimizer. -Sailthru abandoned cart messaging requires the `url` to function properly. +Sailthru abandoned cart messaging requires the `url` to function properly. + +The timestamp of the last payload received (purchase_incomplete.time) will be compared with the clearIncompleteCartAfterNHours value to determine if cart is expired. If the cart is determined to be expired, any pre-existing products in the cart will be removed. ```js analytics.track('Product Added', { @@ -128,11 +161,21 @@ analytics.track('Product Added', { sku: 'G-32', category: 'Games', name: 'Monopoly: 3rd Edition', + url: "https://www.example.com/product/monopoly", brand: 'Hasbro', variant: '200 pieces', price: 18.99, quantity: 1, coupon: 'MAYDEALS', - position: 3 + position: 3, + email: "xxxxxxx@example.com", + clearIncompleteCartAfterNHours: 24 }); ``` + +**Notes:** +* By default the value is null +* Requirement is for the value to be greater than 0 +* Only whole positive numbers are supported. If fractional numbers are included, the number will be truncated (e.g. 1.5 will be 1) +* If a number id passed in a string format such as "1", it will be parsed and converted to integer +* Non-numeric characters are not allowed From db2362e521eb3b3356623ea14a79edcacbdf9b27 Mon Sep 17 00:00:00 2001 From: Sam Shull Date: Thu, 9 Feb 2023 15:50:18 -0600 Subject: [PATCH 02/12] [CHA-1585] spelling fix --- src/connections/destinations/catalog/sailthru-v2/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connections/destinations/catalog/sailthru-v2/index.md b/src/connections/destinations/catalog/sailthru-v2/index.md index 387a0d55f0..2a90cd6fd6 100644 --- a/src/connections/destinations/catalog/sailthru-v2/index.md +++ b/src/connections/destinations/catalog/sailthru-v2/index.md @@ -177,5 +177,5 @@ analytics.track('Product Added', { * By default the value is null * Requirement is for the value to be greater than 0 * Only whole positive numbers are supported. If fractional numbers are included, the number will be truncated (e.g. 1.5 will be 1) -* If a number id passed in a string format such as "1", it will be parsed and converted to integer +* If a number is passed in a string format such as "1", it will be parsed and converted to integer * Non-numeric characters are not allowed From 49bcc5262aaf1e624cfe986c2a7b2383643d51ce Mon Sep 17 00:00:00 2001 From: Sam Shull Date: Thu, 9 Feb 2023 15:54:17 -0600 Subject: [PATCH 03/12] [CHA-1585] replace curly quotes --- src/connections/destinations/catalog/sailthru-v2/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connections/destinations/catalog/sailthru-v2/index.md b/src/connections/destinations/catalog/sailthru-v2/index.md index 2a90cd6fd6..b278f206ee 100644 --- a/src/connections/destinations/catalog/sailthru-v2/index.md +++ b/src/connections/destinations/catalog/sailthru-v2/index.md @@ -100,7 +100,7 @@ analytics.track("Subscribed", { For user deletion, the email needs to be included in the userId or context.traits track call, in a call like the following: ```js -analytics.track(“User Deleted”, {userId:"xxxxxx@example.com" }) +analytics.track("User Deleted", {userId:"xxxxxx@example.com" }) ``` ```js From 73d3568cedbc52ac85e6217ef8b0df4cc27ccaeb Mon Sep 17 00:00:00 2001 From: Sam Shull Date: Fri, 10 Feb 2023 09:10:02 -0600 Subject: [PATCH 04/12] Update src/connections/destinations/catalog/sailthru-v2/index.md Co-authored-by: stayseesong <83784848+stayseesong@users.noreply.github.com> --- src/connections/destinations/catalog/sailthru-v2/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connections/destinations/catalog/sailthru-v2/index.md b/src/connections/destinations/catalog/sailthru-v2/index.md index b278f206ee..a1b01c3811 100644 --- a/src/connections/destinations/catalog/sailthru-v2/index.md +++ b/src/connections/destinations/catalog/sailthru-v2/index.md @@ -46,7 +46,7 @@ Screen events require a `url` property. If Sailthru receives a Screen call witho ### Identify -Send [Identify](/docs/connections/spec/identify) calls to to create or update a Sailthru profile for any identified user on your site. +Send [Identify](/docs/connections/spec/identify) calls to create or update a Sailthru profile for any identified user on your site. Email address passed at top level: ```js From d87e96f5b8d5a97c721d70ab2403e510a591e659 Mon Sep 17 00:00:00 2001 From: Sam Shull Date: Fri, 10 Feb 2023 09:10:20 -0600 Subject: [PATCH 05/12] Update src/connections/destinations/catalog/sailthru-v2/index.md Co-authored-by: stayseesong <83784848+stayseesong@users.noreply.github.com> --- src/connections/destinations/catalog/sailthru-v2/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connections/destinations/catalog/sailthru-v2/index.md b/src/connections/destinations/catalog/sailthru-v2/index.md index a1b01c3811..318bf90640 100644 --- a/src/connections/destinations/catalog/sailthru-v2/index.md +++ b/src/connections/destinations/catalog/sailthru-v2/index.md @@ -48,7 +48,7 @@ Screen events require a `url` property. If Sailthru receives a Screen call witho Send [Identify](/docs/connections/spec/identify) calls to create or update a Sailthru profile for any identified user on your site. -Email address passed at top level: +Pass an email address at the top level using the `identify` call: ```js analytics.identify("assigned-userId", { "name": "Stephen Noel", From ec23b04d3e7fd7a26a5e9b4b909aefd20e199c70 Mon Sep 17 00:00:00 2001 From: Sam Shull Date: Fri, 10 Feb 2023 09:10:42 -0600 Subject: [PATCH 06/12] Update src/connections/destinations/catalog/sailthru-v2/index.md Co-authored-by: stayseesong <83784848+stayseesong@users.noreply.github.com> --- src/connections/destinations/catalog/sailthru-v2/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connections/destinations/catalog/sailthru-v2/index.md b/src/connections/destinations/catalog/sailthru-v2/index.md index 318bf90640..2f5e42badb 100644 --- a/src/connections/destinations/catalog/sailthru-v2/index.md +++ b/src/connections/destinations/catalog/sailthru-v2/index.md @@ -58,7 +58,7 @@ analytics.identify("assigned-userId", { }); ``` -Email passed under context.traits: +Pass an email under `context.traits` using the identify call: ```js analytics.identify("assigned-userId", { "name": "Stephen Noel", From 98bf722feefd368c762a747ecd99cb02e5aa886f Mon Sep 17 00:00:00 2001 From: Sam Shull Date: Fri, 10 Feb 2023 09:11:19 -0600 Subject: [PATCH 07/12] Update src/connections/destinations/catalog/sailthru-v2/index.md Co-authored-by: stayseesong <83784848+stayseesong@users.noreply.github.com> --- src/connections/destinations/catalog/sailthru-v2/index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/connections/destinations/catalog/sailthru-v2/index.md b/src/connections/destinations/catalog/sailthru-v2/index.md index 2f5e42badb..d453648c4a 100644 --- a/src/connections/destinations/catalog/sailthru-v2/index.md +++ b/src/connections/destinations/catalog/sailthru-v2/index.md @@ -71,7 +71,8 @@ analytics.identify("assigned-userId", { ); ``` -**Note:** Sailthru will also search for the email address in the identify call() under context.traits if not provided at the top-level. +> note "" +> **NOTE:** Sailthru searches for the email address in the `identify` call under `context.traits` if it isn't provided at the top-level. ### Track From f377d4f088d8a1425a5c6e245a28c3950432fbfb Mon Sep 17 00:00:00 2001 From: Sam Shull Date: Fri, 10 Feb 2023 09:11:36 -0600 Subject: [PATCH 08/12] Update src/connections/destinations/catalog/sailthru-v2/index.md Co-authored-by: stayseesong <83784848+stayseesong@users.noreply.github.com> --- src/connections/destinations/catalog/sailthru-v2/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connections/destinations/catalog/sailthru-v2/index.md b/src/connections/destinations/catalog/sailthru-v2/index.md index d453648c4a..073764a1e2 100644 --- a/src/connections/destinations/catalog/sailthru-v2/index.md +++ b/src/connections/destinations/catalog/sailthru-v2/index.md @@ -98,7 +98,7 @@ analytics.track("Subscribed", { #### Delete a User -For user deletion, the email needs to be included in the userId or context.traits track call, in a call like the following: +To delete a user, the email needs to be included in the `userId` or `context.traits` track call, in a call like the following: ```js analytics.track("User Deleted", {userId:"xxxxxx@example.com" }) From 5393484e0a415b7a528d789672dfcf96a56a1ef0 Mon Sep 17 00:00:00 2001 From: Sam Shull Date: Fri, 10 Feb 2023 09:11:54 -0600 Subject: [PATCH 09/12] Update src/connections/destinations/catalog/sailthru-v2/index.md Co-authored-by: stayseesong <83784848+stayseesong@users.noreply.github.com> --- src/connections/destinations/catalog/sailthru-v2/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connections/destinations/catalog/sailthru-v2/index.md b/src/connections/destinations/catalog/sailthru-v2/index.md index 073764a1e2..485992c911 100644 --- a/src/connections/destinations/catalog/sailthru-v2/index.md +++ b/src/connections/destinations/catalog/sailthru-v2/index.md @@ -152,7 +152,7 @@ Send `Product Added` and `Product Removed` Track events for Sailthru's abandoned Sailthru abandoned cart messaging requires the `url` to function properly. -The timestamp of the last payload received (purchase_incomplete.time) will be compared with the clearIncompleteCartAfterNHours value to determine if cart is expired. If the cart is determined to be expired, any pre-existing products in the cart will be removed. +To determine if the cart is expired, the timestamp of the last payload received (`purchase_incomplete.time`) is compared with the `clearIncompleteCartAfterNHours` value. If the cart is expired, any pre-existing products in the cart will be removed. ```js analytics.track('Product Added', { From 5bbfc1c96fed9749728145531f442e88d7c35c52 Mon Sep 17 00:00:00 2001 From: Sam Shull Date: Wed, 15 Feb 2023 10:39:11 -0600 Subject: [PATCH 10/12] Update src/connections/destinations/catalog/sailthru-v2/index.md Co-authored-by: stayseesong <83784848+stayseesong@users.noreply.github.com> --- src/connections/destinations/catalog/sailthru-v2/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connections/destinations/catalog/sailthru-v2/index.md b/src/connections/destinations/catalog/sailthru-v2/index.md index 485992c911..20307497f0 100644 --- a/src/connections/destinations/catalog/sailthru-v2/index.md +++ b/src/connections/destinations/catalog/sailthru-v2/index.md @@ -98,7 +98,7 @@ analytics.track("Subscribed", { #### Delete a User -To delete a user, the email needs to be included in the `userId` or `context.traits` track call, in a call like the following: +To delete a user, you need to include the email in the `userId` or `context.traits` track call, in a call like the following: ```js analytics.track("User Deleted", {userId:"xxxxxx@example.com" }) From cd708565d53e77855f8ed5b1720bd64826149626 Mon Sep 17 00:00:00 2001 From: Sam Shull Date: Wed, 15 Feb 2023 10:39:29 -0600 Subject: [PATCH 11/12] Update src/connections/destinations/catalog/sailthru-v2/index.md Co-authored-by: stayseesong <83784848+stayseesong@users.noreply.github.com> --- src/connections/destinations/catalog/sailthru-v2/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connections/destinations/catalog/sailthru-v2/index.md b/src/connections/destinations/catalog/sailthru-v2/index.md index 20307497f0..52ce0f4d56 100644 --- a/src/connections/destinations/catalog/sailthru-v2/index.md +++ b/src/connections/destinations/catalog/sailthru-v2/index.md @@ -177,6 +177,6 @@ analytics.track('Product Added', { **Notes:** * By default the value is null * Requirement is for the value to be greater than 0 -* Only whole positive numbers are supported. If fractional numbers are included, the number will be truncated (e.g. 1.5 will be 1) +* Only whole positive numbers are supported. If fractional numbers are included, the number will be truncated (for example, 1.5 will be 1) * If a number is passed in a string format such as "1", it will be parsed and converted to integer * Non-numeric characters are not allowed From f14833125acaf43adb1176f4e5aeac8954a084f4 Mon Sep 17 00:00:00 2001 From: Sam Shull Date: Wed, 15 Feb 2023 10:44:48 -0600 Subject: [PATCH 12/12] [CHA-1585] add code formatting to string-number example --- src/connections/destinations/catalog/sailthru-v2/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connections/destinations/catalog/sailthru-v2/index.md b/src/connections/destinations/catalog/sailthru-v2/index.md index 52ce0f4d56..d39681c934 100644 --- a/src/connections/destinations/catalog/sailthru-v2/index.md +++ b/src/connections/destinations/catalog/sailthru-v2/index.md @@ -178,5 +178,5 @@ analytics.track('Product Added', { * By default the value is null * Requirement is for the value to be greater than 0 * Only whole positive numbers are supported. If fractional numbers are included, the number will be truncated (for example, 1.5 will be 1) -* If a number is passed in a string format such as "1", it will be parsed and converted to integer +* If a number is passed in a string format such as `"1"`, it will be parsed and converted to integer * Non-numeric characters are not allowed