Skip to content
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test:

deployment:
development:
branch: ["dev", "circleci", "test"]
branch: ["dev", "test"]
commands:
- ./deploy/eb-deploy.sh tc-connect2sf DEV $CIRCLE_BUILD_NUM
production:
Expand Down
5 changes: 4 additions & 1 deletion consumer/src/services/ConsumerService.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,15 @@ class ConsumerService {
LeadSource: leadSource,
Company: company,
OwnerId: config.ownerId,
TC_Handle__c: user.handle,
TC_Connect_Project_Id__c: project.id,
TC_Connect_Description__c: _.get(project,"description",""),
TC_Connect_Project_Status__c: _.get(project,"status",""),
Ref_Code__c: _.get(project, "details.utm.code",""),
TC_Connect_Direct_Project_Id__c: _.get(project, "directProjectId",""),
TC_Connect_Cancel_Reason__c: _.get(project,"cancelReason","")
TC_Connect_Cancel_Reason__c: _.get(project,"cancelReason",""),
Google_Analytics_Click_ID__c: _.get(project,"details.utm.google._gclid",""),
Google_Analytics_Client_ID__c: _.get(project,"details.utm.google._gacid","")
};
return SalesforceService.createObject('Lead', lead, accessToken, instanceUrl)
.then((leadId) => {
Expand Down
12 changes: 10 additions & 2 deletions consumer/test/ConsumerService.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ describe('ConsumerService', () => {
firstName: 'john',
lastName: 'doe',
email: 'jd@example.com',
handle: 'jdoe'
};
const sfAuth = {
accessToken: 'fake-token',
Expand All @@ -29,7 +30,11 @@ describe('ConsumerService', () => {
id: 1,
details: {
utm: {
code: "123"
code: "123",
google: {
_gacid: "1234.5678",
_gclid: "5678.1234"
}
}
},
cancelReason: null,
Expand Down Expand Up @@ -80,12 +85,15 @@ describe('ConsumerService', () => {
LeadSource: 'Connect',
Company: 'Unknown',
OwnerId: config.ownerId,
TC_Handle__c: 'jdoe',
TC_Connect_Project_Id__c: 1,
Ref_Code__c: '123',
TC_Connect_Project_Status__c: '',
TC_Connect_Cancel_Reason__c: null,
TC_Connect_Direct_Project_Id__c: '',
TC_Connect_Description__c:''
TC_Connect_Description__c:'',
Google_Analytics_Click_ID__c:'5678.1234',
Google_Analytics_Client_ID__c:'1234.5678'
};

const expectedCampaignMember = {
Expand Down