pipelineAttributes.ownerId = attributes.ownerId; pipelineAttributes.ownerType = attributes.ownerType; pipelineAttributes.datasource = attributes.datasource; if( request.currentTerritoryList neq "") { pipelineAttributes.territoryId = request.currentTerritoryList; } else { pipelineAttributes.territoryId = -1; } pipelineAttributes.opportunityLinkScript = attributes.opportunityLinkScript; pipelineAttributes.opportunityLinkAdditionalQueryString = attributes.opportunityLinkAdditionalQueryString; pipelineAttributes.additionalQueryString = ""; pipelineAttributes.campaignId = client.spl_campaign; if( client.spl_oppType neq "" ) { pipelineAttributes.typeCode = client.spl_oppType; } if( client.spl_stage neq "" ) { pipelineAttributes.stageId = client.spl_stage; } if( client.spl_volumeThreshold neq "" ) { if( isNumeric( client.spl_volumeThreshold ) ) { pipelineAttributes.volumeLowerLimit = client.spl_volumeThreshold; } else { pipelineAttributes.volumeUpperLimit = Mid( client.spl_volumethreshold, 2, Len( client.spl_volumethreshold ) - 1 ) - 1; } } if( client.spl_ageRange neq "" ) { today = CreateDate( Year( Now() ), Month( Now() ), Day( Now() )); startDays = ListFirst( client.spl_ageRange ); endDays = ListLast( client.spl_ageRange ); if( startDays gt 0 ) { pipelineAttributes.createDateUpperLimit = DateAdd( "D", startDays * -1, today ); pipelineAttributes.createDateUpperLimit = CreateDateTime( Year( pipelineAttributes.createDateUpperLimit ), Month( pipelineAttributes.createDateUpperLimit ), Day( pipelineAttributes.createDateUpperLimit ), 23,59,59 ); } if( endDays gt 0 ) { pipelineAttributes.createDateLowerLimit = DateAdd( "D", endDays * -1, today ); } } if( client.spl_updateRange neq "" ) { today = CreateDate( Year( Now() ), Month( Now() ), Day( Now() )); startDays = ListFirst( client.spl_updateRange ); endDays = ListLast( client.spl_updateRange ); if( startDays gt 0 ) { pipelineAttributes.updateDateUpperLimit = DateAdd( "D", startDays * -1, today ); pipelineAttributes.updateDateUpperLimit = CreateDateTime( Year( pipelineAttributes.updateDateUpperLimit ), Month( pipelineAttributes.updateDateUpperLimit ), Day( pipelineAttributes.updateDateUpperLimit ), 23,59,59 ); } if( endDays gt 0 ) { pipelineAttributes.updateDateLowerLimit = DateAdd( "D", endDays * -1, today ); } } pipelineAttributes.productClassification = client.spl_productClassification; pipelineAttributes.customCode = client.spl_codeType; pipelineAttributes.subjectType = attributes.subjectType; pipelineAttributes.financialMarginMethod = attributes.financialMarginMethod; if( client.spl_classification gt 0 ) { pipelineAttributes.operatorClassification = client.spl_classification; } if( client.spl_segment gt 0 ) { pipelineAttributes.operatorSegment = client.spl_segment; }