Skip to content

Commit a0d4efc

Browse files
chore: allow only anonymousId set from note attributes
1 parent 53d2bef commit a0d4efc

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/v1/sources/shopify/webhookTransformations/serverSideUtlis.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
const { isDefinedAndNotNull } = require('@rudderstack/integrations-lib');
2-
const { v5 } = require('uuid');
32
const { constructPayload } = require('../../../../v0/util');
43
const {
54
lineItemsMappingJSON,
@@ -47,18 +46,12 @@ const createPropertiesForEcomEventFromWebhook = (message) => {
4746
*/
4847
const getAnonymousIdFromAttributes = async (event) => {
4948
let anonymousId = null;
50-
let cartToken = null;
5149
const noteAttributes = event.note_attributes;
5250
if (isDefinedAndNotNull(event) && isDefinedAndNotNull(noteAttributes)) {
5351
const rudderAnonymousIdObject = noteAttributes.find(
5452
(attr) => attr.name === 'rudderAnonymousId',
5553
);
5654
anonymousId = rudderAnonymousIdObject ? rudderAnonymousIdObject.value : null;
57-
const cartTokenObject = noteAttributes.find((attr) => attr.name === 'cartToken');
58-
cartToken = cartTokenObject ? cartTokenObject.value : null;
59-
if (!isDefinedAndNotNull(anonymousId) && isDefinedAndNotNull(cartToken)) {
60-
anonymousId = v5(cartToken, v5.URL);
61-
}
6255
}
6356
return anonymousId;
6457
};

0 commit comments

Comments
 (0)