File tree Expand file tree Collapse file tree 1 file changed +0
-7
lines changed
src/v1/sources/shopify/webhookTransformations Expand file tree Collapse file tree 1 file changed +0
-7
lines changed Original file line number Diff line number Diff line change 1
1
const { isDefinedAndNotNull } = require ( '@rudderstack/integrations-lib' ) ;
2
- const { v5 } = require ( 'uuid' ) ;
3
2
const { constructPayload } = require ( '../../../../v0/util' ) ;
4
3
const {
5
4
lineItemsMappingJSON,
@@ -47,18 +46,12 @@ const createPropertiesForEcomEventFromWebhook = (message) => {
47
46
*/
48
47
const getAnonymousIdFromAttributes = async ( event ) => {
49
48
let anonymousId = null ;
50
- let cartToken = null ;
51
49
const noteAttributes = event . note_attributes ;
52
50
if ( isDefinedAndNotNull ( event ) && isDefinedAndNotNull ( noteAttributes ) ) {
53
51
const rudderAnonymousIdObject = noteAttributes . find (
54
52
( attr ) => attr . name === 'rudderAnonymousId' ,
55
53
) ;
56
54
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
- }
62
55
}
63
56
return anonymousId ;
64
57
} ;
You can’t perform that action at this time.
0 commit comments