Queries to Index Fields

Package Version 1.56 and later
Query 1
select id from smagicinteract__smsMagic__c where (smagicinteract__Unformatted_Phone_Number__c in :phoneValues or smagicinteract__PhoneNumber__c in :phoneValues) and smagicinteract__senderid__c = :inboundNumber limit 1
Query 2
select id from smagicinteract__Conversation__c  where smagicinteract__Sender__r.smagicinteract__senderId__c in :senderIDSet and smagicinteract__Mobile_Number__c  = :mobileSet and smagicinteract__State__c = \’Open\’ and ownerID = :userID order by createddate desc
Fields
•smagicinteract__Unformatted_Phone_Number__c•smagicinteract__PhoneNumber__c of smagicinteract__smsMagic__c•smagicinteract__Mobile_Number__c of smagicinteract__Conversation__c
select id from smagicinteract__smsMagic__c where smagicinteract__Direction__c = :directionValue and (smagicinteract__Lead__c = null OR smagicinteract__lead__r.isconverted = false) and (smagicinteract__Unformatted_Phone_Number__c in :phoneValues or smagicinteract__PhoneNumber__c in :phoneValues)  and smagicinteract__senderid__c in :outgoingSenderIds order by smagicinteract__CreatedOn__c desc NULLS LAST limit 1

Package Version 1.52 -55
Query
select id from smagicinteract__smsMagic__c where (smagicinteract__Unformatted_Phone_Number__c in :phoneValues or smagicinteract__PhoneNumber__c in :phoneValues) and smagicinteract__senderid__c = :inboundNumber limit 1
Fields
•smagicinteract__Unformatted_Phone_Number__c•smagicinteract__PhoneNumber__c of smagicinteract__smsMagic__c
select smagicinteract__account__r.sms_us_homephone__c,smagicinteract__account__r.sms_us_phone__c,smagicinteract__contact__r.sms_us_phone__c,smagicinteract__lead__r.sms_us_phone__c,smagicinteract__opportunity__r.account.home_phone__c,smagicinteract__opportunity__r.account.phone,smagicinteract__opportunity__r.account.sms_us_homephone__c,smagicinteract__opportunity__r.account.sms_us_phone__c,zinvoice__r.sms_phone__c,smagicinteract__account__c,smagicinteract__contact__c,smagicinteract__lead__c,smagicinteract__opportunity__c,zinvoice__c,Id,smagicinteract__lead__r.isconverted,smagicinteract__senderid__c,smagicinteract__phonenumber__c,smagicinteract__unformatted_phone_number__c,smagicinteract__Converse_App__c,smagicinteract__Converse_App_Action__c,smagicinteract__Converse_App_Task__c,smagicinteract__Conversation__c,smagicinteract__ObjectType__c from smagicinteract__smsMagic__c where smagicinteract__Direction__c = :directionValue and (smagicinteract__Lead__c = null OR smagicinteract__lead__r.isconverted = false) and (smagicinteract__Unformatted_Phone_Number__c in :phoneValues or smagicinteract__PhoneNumber__c in :phoneValues)  and smagicinteract__senderid__c in :outgoingSenderIds order by smagicinteract__CreatedOn__c desc NULLS LAST limit 1

Package Version 1.51
Query
select id from smagicinteract__smsMagic__c where (smagicinteract__Unformatted_Phone_Number__c in :phoneValues or smagicinteract__PhoneNumber__c in :phoneValues) and smagicinteract__senderid__c = :inboundNumber limit 1
Fields to Index
•smagicinteract__Unformatted_Phone_Number__c•smagicinteract__PhoneNumber__c of smagicinteract__smsMagic__c

Package Version 1.50
Query
select id from smagicinteract__smsMagic__c where (smagicinteract__Unformatted_Phone_Number__c in :phoneValues or smagicinteract__PhoneNumber__c in :phoneValues) and smagicinteract__senderid__c = :inboundNumber limit 1select id from smagicinteract__Conversation__c  where smagicinteract__Sender__r.smagicinteract__senderId__c in :senderIDSet and smagicinteract__Mobile_Number__c  = :mobileSet and smagicinteract__State__c = \’Open\’ and ownerID = :userID order by createddate desc
Fields to Index
•smagicinteract__Unformatted_Phone_Number__c•smagicinteract__PhoneNumber__c of smagicinteract__smsMagic__c•smagicinteract__Mobile_Number__c of smagicinteract__Conversation__c

Package Version 1.48 or earlier
Query
select id from smagicinteract__smsMagic__c wheresmagicinteract__PhoneNumber__c in :MobNum1 order by createdDate desc limit 1
Fields to Index
smagicinteract__PhoneNumber__c of smagicinteract__smsMagic__c

Was This Article Helpful?

Important Announcement!

URGENT! Please register the 10-digit business phone number (e.g. 555-555-5555) that your organization uses to send texts to consumers in the U.S. Failure to register may cause heavy penalties and disruption to all your text messaging communications.