Skip to content

Commit cf48806

Browse files
adding phone field into payload (#3380)
1 parent c10e5bc commit cf48806

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

packages/destination-actions/src/destinations/taguchi/syncUserProfile/__tests__/__snapshots__/snapshot.test.ts.snap

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ Array [
88
"address2": "Testville",
99
"address3": "TS",
1010
"country": "Test Country",
11-
"custom": Object {
12-
"phone": "+1234567890",
13-
},
1411
"dob": "2024-06-10",
1512
"email": "[email protected]",
1613
"firstname": "Test",
@@ -27,6 +24,7 @@ Array [
2724
},
2825
],
2926
"organizationId": 123,
27+
"phone": "+1234567890",
3028
"postcode": "12345",
3129
"ref": "test-user-123",
3230
"state": "Test State",

packages/destination-actions/src/destinations/taguchi/syncUserProfile/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export interface JSONItem {
1919
state?: string
2020
country?: string
2121
postcode?: string
22+
phone?: string
2223
gender?: string
2324

2425
// Custom traits. Including Computed Traits.

packages/destination-actions/src/destinations/taguchi/syncUserProfile/utils.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ export function validate(payloads: Payload[]): Payload[] {
1414
}
1515

1616
export async function send(request: RequestClient, payloads: Payload[], settings: Settings, isBatch: boolean) {
17-
// if(!isBatch){
17+
if(!isBatch){
1818
validate(payloads)
19-
// }
19+
}
2020

2121
const json: TaguchiJSON = payloads.map((payload) => buildJSON(payload, settings.organizationId))
2222

@@ -68,6 +68,7 @@ function buildJSON(payload: Payload, organizationId: string): JSONItem {
6868
state,
6969
country,
7070
postcode,
71+
phone,
7172
gender,
7273
...customTraits
7374
} = {}
@@ -90,6 +91,7 @@ function buildJSON(payload: Payload, organizationId: string): JSONItem {
9091
...(state && { state }),
9192
...(country && { country }),
9293
...(postcode && { postcode }),
94+
...(phone && { phone }),
9395
...(gender && { gender }),
9496
// Add custom traits
9597
...buildCustom(customTraits),

0 commit comments

Comments
 (0)