Ali
11/26/2019, 6:42 PMsuitedev
11/26/2019, 6:44 PMerictgrubaugh
11/26/2019, 6:44 PMerictgrubaugh
11/26/2019, 6:44 PMDavid Durst
11/26/2019, 6:45 PMsuitedev
11/26/2019, 6:45 PMAli
11/26/2019, 6:47 PMAli
11/26/2019, 6:48 PMAli
11/26/2019, 6:49 PMDavid Durst
11/26/2019, 6:51 PMDavid Durst
11/26/2019, 6:52 PMAli
11/26/2019, 6:52 PMDavid Durst
11/26/2019, 6:53 PMDavid Durst
11/26/2019, 6:55 PMAli
11/26/2019, 6:56 PMDavid Durst
11/26/2019, 6:58 PMMichael Pope
11/26/2019, 6:59 PMMichael Pope
11/26/2019, 6:59 PMsterling_rose
11/26/2019, 6:59 PMMichael Pope
11/26/2019, 6:59 PMDavid Durst
11/26/2019, 7:00 PMAli
11/26/2019, 7:00 PMDavid Durst
11/26/2019, 7:01 PMMichael Pope
11/26/2019, 7:01 PM[['internalid', 'is', group1], 'and', ['groupmember.phone', 'isnotempty', null], 'or', ['internalid', 'is', group2], 'and', ['groupmember.phone', 'isnotempty', null], 'or', ...]
and then to add a column to know which groupmember
it isDavid Durst
11/26/2019, 7:01 PMAli
11/26/2019, 7:02 PMDavid Durst
11/26/2019, 7:03 PMcreateSearch
Ali
11/26/2019, 7:04 PM({
type: 'entitygroup',
columns: [{ name: 'internalid', join: 'groupmember' }],
filters: [['internalid', 'is', group], 'and', ['groupmember.phone', 'isnotempty', null]]
}).run().each(res => {
memberInternalIds.push(res.getValue({ name: 'internalid', join: 'groupmember' }) as string);
return true;
})
Ali
11/26/2019, 7:04 PM({
type: 'phonecall',
columns: ['company', 'contact', 'phone'],
filters: [['custevent_campaign_phone_join', 'is', campaignId]]
}).run().each(res => {
searchResults.push({ id: res.id, company: res.getValue('company'), contact: res.getText('contact'), contactId: res.getValue('contact'), phone: res.getValue('phone') })
return true
})
David Durst
11/26/2019, 7:05 PMAli
11/26/2019, 7:06 PMsuitedev
11/26/2019, 7:19 PMAli
11/26/2019, 7:20 PMjkabot
11/26/2019, 7:23 PMconst memberInternalIds: string[] = []
memberInternalIds.push(res.getValue({ name: 'internalid', join: 'groupmember' }) as string);
erictgrubaugh
11/26/2019, 7:27 PMjkabot
11/26/2019, 7:29 PM['custevent_campaign_phone_join', 'is', campaignId]
erictgrubaugh
11/26/2019, 7:29 PMlookupFields
uses another 1, then each delete
uses 10, so you'll quickly run out of your 1000 if the deletions or searches have any sort of significant scalejkabot
11/26/2019, 7:29 PM['custevent_campaign_phone_join', 'anyof', [campaignIds]]
Ali
11/26/2019, 7:33 PMAli
11/26/2019, 7:33 PMAli
11/26/2019, 7:33 PMjkabot
11/26/2019, 7:34 PMmemberInternalIds.forEach(id => {
let phoneCallData = lookupFields({
type: Type.CONTACT,
id,
columns: ['company', 'internalid', 'phone', 'customer.isinactive']
})
Ali
11/26/2019, 7:34 PMerictgrubaugh
11/26/2019, 7:35 PMjkabot
11/26/2019, 7:35 PMerictgrubaugh
11/26/2019, 7:36 PMAli
11/26/2019, 7:36 PMerictgrubaugh
11/26/2019, 7:37 PMjkabot
11/26/2019, 7:37 PMAli
11/26/2019, 7:37 PMAli
11/26/2019, 7:38 PMerictgrubaugh
11/26/2019, 7:38 PMerictgrubaugh
11/26/2019, 7:38 PMAli
11/26/2019, 7:38 PMDavid Durst
11/26/2019, 9:19 PMerictgrubaugh
11/26/2019, 9:26 PMerictgrubaugh
11/26/2019, 9:31 PMerictgrubaugh
11/26/2019, 9:31 PMerictgrubaugh
11/26/2019, 9:31 PMerictgrubaugh
11/26/2019, 9:37 PMerictgrubaugh
11/26/2019, 9:37 PMerictgrubaugh
11/26/2019, 9:38 PM