Skip to content

Commit

Permalink
chore: code review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mihir-4116 committed Jan 8, 2024
1 parent 68fee5e commit 3f7b61e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/cdk/v2/destinations/intercom/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const ReservedUserAttributes = [
'firstname',
'createdAt',
'timestamp',
'lastSeenAt',
'originalTimestamp',
'unsubscribedFromEmails',
];
Expand Down
2 changes: 1 addition & 1 deletion src/cdk/v2/destinations/intercom/procWorkflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ steps:
email: {{{{$.getGenericPaths("email")}}}},
phone: {{{{$.getGenericPaths("phone")}}}},
avatar: {{{{$.getGenericPaths("avatar")}}}},
last_seen_at: $.toSeconds({{{{$.getGenericPaths("timestamp")}}}}),
last_seen_at: $.toSeconds(.context.traits.lastSeenAt),
role: .traits.role || .context.traits.role,
signed_up_at: $.toSeconds(.traits.createdAt || .context.traits.createdAt),
owner_id: .traits.ownerId || .context.traits.ownerId ? Number(.traits.ownerId || .context.traits.ownerId) : undefined,
Expand Down
4 changes: 2 additions & 2 deletions test/integrations/destinations/intercom/processor/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ export const data = [
lastName: 'Rudderlabs',
address: 'california usa',
ownerId: '13',
lastSeenAt: '2023-11-10T14:42:44.724Z',
},
},
type: 'identify',
Expand Down Expand Up @@ -267,7 +268,7 @@ export const data = [
JSON: {
email: '[email protected]',
external_id: 'user@1',
last_seen_at: 1700628164,
last_seen_at: 1699627364,
name: 'Test Rudderlabs',
owner_id: 13,
phone: '+91 9999999999',
Expand Down Expand Up @@ -358,7 +359,6 @@ export const data = [
JSON: {
email: '[email protected]',
external_id: 'user@2',
last_seen_at: 1700628164,
name: 'Test RudderStack',
owner_id: 14,
phone: '+91 9299999999',
Expand Down
3 changes: 2 additions & 1 deletion test/integrations/destinations/intercom/router/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const data = [
lastName: 'Rudderlabs',
address: 'california usa',
ownerId: '13',
lastSeenAt: '2023-11-10T14:42:44.724Z',
},
},
type: 'identify',
Expand Down Expand Up @@ -191,7 +192,7 @@ export const data = [
JSON: {
email: '[email protected]',
external_id: 'user@1',
last_seen_at: 1700628164,
last_seen_at: 1699627364,
name: 'Test Rudderlabs',
owner_id: 13,
phone: '+91 9999999999',
Expand Down

0 comments on commit 3f7b61e

Please sign in to comment.