We have two methods of Incoming Lookup configuration.

1st Method - Setup on Salesforce by going to page SMS Magic Interact > SMS Settings > Configure Action on Incoming SMS > scroll down to find New Incoming Lookup button.

2nd Method - This method comes into picture only if the 1st Method does not work correctly - this is enabled from the back end settings of SMS Magic.

Let me explain you the 1st Method - setting up incoming lookup configuration through SFDC settings.

Pre-Requisite : You should have a lookup relationship field created on the "Incoming SMS" and "SMS History" objects. As a managed application, we provide you with some default fields created which are mentioned below -

Incoming SMS Object - Lead, Contact, Case, Campaign

SMS History Object - Lead, Contact, Campaign.

For any other object, you will have to first create this manually. To do the same, please Go to Setup > Build > Create > Objects > Incoming SMS/SMS History > Click on "New" for Custom Fields and Relationship > select "Lookup Relationship" > select Object in the next step and click on Save.

Method 1:

Once this is done, you can Go To SMS Magic Interact(top right corner of SFDC page) > SMS Settings > Configure Action on Incoming SMS > scroll down to find New Incoming Lookup button.

Please refer image to understand the significance of Step1, Step2 and Step3 -

Step 4 : You will get two options - Last Sender OR Record Owner.

Here is the explanation for the same - 

Last Sender - this means that if USER A is the sender of the text message and you receive an incoming sms from the same number, in this case, USER A would become the owner of Incoming SMS.

Record Owner - this means that if USER B is the owner of a record and you receive an incoming sms from that particular record(regardless of who sent the outgoing sms), USER B would become the owner of Incoming SMS.

Step 5 : Notify Owner - if this is marked as True, it will send an email notification on incoming sms as per the owner selected in Step 4.

Method 2:

This method comes into picture(automatically) only when SMS Magic App is not able to find the relevant record using Method 1.

On our BackEnd, we have a setting such that - 

  1. When you send an SMS from Salesforce, we gather the data i.e. RecordID, Mobile Number and SenderID and bundle up this data into an Encoded format.
  2. When you receive an Incoming response on Salesforce, we try to match the Mobile Number with the Encoded Data which was created while sending the initial message.
  3. If the match is successfull, we simply update the Record ID in the Incoming SMS which is created in Salesforce hence associating the Incoming SMS to the relevant Record  through its Record ID.
  4. In this case, the Owner of the Incoming SMS is selected as the User whose username credentials were used to establish Oauth connection between Salesforce and SMS Magic Customer Portal(there is no logic of Last Sender or Record Owner here).