# SMS Magic Interact for Zoho CRM > **Source**: [SMS-Magic](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm) > >

This integration streamlines your communication efforts, allowing you to engage with your contacts more effectively through SMS-Magic's innovative features. Whether you're sending personalized messages, automating workflows, or tracking interactions,

## Browse Collection 1. [Configuring Modules ](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/FmBITofFCzs-configuring-modules.md) (Article) 2. [Overview Messaging Services](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/Okz0WTkf8m8-overview-messaging-services.md) (Article) 3. [IP Whitelisting](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/DzLqto6KaLM-ip-whitelisting.md) (Article) 4. [Message Template](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/3pNcGDK9EFo-message-template.md) (Article) 5. [Overview- Set up autoresponders in Zoho](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/QpHX5tKMfng-overview-set-up-autoresponders-in-zoho.md) (Article) 6. [Adding send sms button](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/cstLhZj4L6E-adding-send-sms-button.md) (Article) 7. [Converse desk - Overview](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/4FOPo5JS47Y-converse-desk-overview.md) (Article) 8. [Incoming messages overview](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/FTQMLI6zogc-incoming-messages-overview.md) (Article) 9. [Overview](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/ff2RmXcCS0A-overview.md) (Article) 10. [Create a New Campaign](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/hyTJsQbesbk-create-a-new-campaign.md) (Article) 11. [Incoming Message Notification](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/C38NFh9ZrOk-incoming-message-notification.md) (Article) 12. [Url shortening](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/qwsWNqyfi88-url-shortening.md) (Article) 13. [Pre-requisites](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/JE4f9gxRubA-pre-requisites.md) (Article) 14. [Transfer SMS History from Leads to Contacts](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/VJbR15qiVU8-transfer-sms-history-from-leads-to-contacts.md) (Article) 15. [Manage Access](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/manage-access.md) (Article) 16. [Account Activity](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/account-activity.md) (Article) 17. [SMS History in Zoho CRM](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/uXJ9BbAZOOM-sms-history-in-zoho-crm.md) (Article) 18. [Module Lookup on SMS History](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/5LvnCzIPigs-module-lookup-on-sms-history.md) (Article) 19. [Setup Converse Desk in Zoho CRM](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/MHxMNeujOvk-setup-converse-desk-in-zoho-crm.md) (Article) 20. [Email Notification on Incoming Messages ](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/NR2f7nROc8w-email-notification-on-incoming-messages.md) (Article) 21. [Manage Your Message Templates](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/pMuINfyGd9M-manage-your-message-templates.md) (Article) 22. [Send Single from Zoho CRM](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/I03m5CddWnM-send-single-from-zoho-crm.md) (Article) 23. [Understanding the JSON Payload Configuration for Automation](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/jpiRCnokU70-understanding-the-json-payload-configuration-for-automation.md) (Article) 24. [Manage Campaigns](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/tRuviPwePmo-manage-campaigns.md) (Article) 25. [Configuration - URL shortening](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/SaB8uMqITic-configuration-url-shortening.md) (Article) 26. [Messaging dashboard](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/bcOs3EMY5ds-messaging-dashboard.md) (Article) 27. [Zoho setup-overview](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/v4xBnfdKomM-zoho-setup-overview.md) (Article) 28. [Coverage](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/coverage.md) (Article) 29. [Initiate a New Conversation](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/gUkh4biEyL8-initiate-a-new-conversation.md) (Article) 30. [Sender ID/ Numbers Setup in Zoho CRM](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/FRxeLRuUov8-sender-id-numbers-setup-in-zoho-crm.md) (Article) 31. [Adding send bulk sms button](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/d0rIJ5xFHQY-adding-send-bulk-sms-button.md) (Article) 32. [Signup for free trial](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/0J2G0J1ICsc-signup-for-free-trial.md) (Article) 33. [Create Webhooks](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/VW6XpAXKtGQ-create-webhooks.md) (Article) 34. [Shortened Links](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/xHBCSOzNfG8-shortened-links.md) (Article) 35. [Manage Conversations](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/xIHnOhlXu3g-manage-conversations.md) (Article) 36. [Deleting a Shortened URL](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/YtHcuBm9E9Y-deleting-a-shortened-url.md) (Article) 37. [Inbox](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/6Jw3m028sjs-inbox.md) (Article) 38. [Associate the Webhook with the Workflow Rule](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/ntQHpBOI7u0-associate-the-webhook-with-the-workflow-rule.md) (Article) 39. [Setup Outbound and Inbound Sender IDs](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/setup-outbound-and-inbound-sender-ids.md) (Article) 40. [Installation](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/qO2HiOSNkfY-installation.md) (Article) 41. [Send Message as Campaign from Zoho ](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/KfBH7wC2JW4-send-message-as-campaign-from-zoho.md) (Article) 42. [Using Short links in Converse Desk](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/OaRzWo5thuM-using-short-links-in-converse-desk.md) (Article) 43. [Invite new users](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/kueBjT9QV2U-invite-new-users.md) (Article) 44. [Manage your Sender IDs](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/0Zd2JtOcruU-manage-your-sender-ids.md) (Article) 45. [Bulk SMS to List](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/6eKrX03qllg-bulk-sms-to-list.md) (Article) 46. [Sending Bulk messages from Zoho Lists](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/cPGerQQWQxw-sending-bulk-messages-from-zoho-lists.md) (Article) 47. [Setup Business Hours Compliance](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/setup-business-hours-compliance.md) (Article) 48. [Setup Consent Management ](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/KL26A5kIfbw-setup-consent-management.md) (Article) 49. [Setup Multi-Channel Integrations](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/setup-multi-channel-integrations.md) (Article) 50. [Messaging Quickstarts](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/m89VOpsezFY-messaging-quickstarts.md) (Article) 51. [Alert and Subscription Management](https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/xU2cdRS8uAQ-alert-and-subscription-management.md) (Article) --- # ARTICLE: Module Lookup on SMS History ## METADATA - id: 1HlWXrVuul3BpyRuALLqyw - type: article - source: SMS-Magic - content_url: https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm/5LvnCzIPigs-module-lookup-on-sms-history - collection_url: https://docs.sms-magic.com/CxEiDhI6bks-sms-magic-interact-for-zoho-crm ## CONTENT ### Incoming and Outgoing messages in SMS History get associated with a relevant Lead/Contact record for which the mobile number of the recipient matches.  > **Notes:** > If multiple Lead or Contact records have the same Mobile Number, there can be discrepancies in the association of Lead/Contact. To associate SMS History records with a relevant Custom Module record, you can configure Custom Module Lookup on SMS History. Follow the steps below to configure Lookup for your required Custom Modules - 1. Create Lookup Field in SMS History Module layout Create a Lookup field in SMS History for the custom module you wish to associate relevant SMS History records with. For the Deals module, we will create a lookup field - “Deal” in the standard layout of the SMS History module.  - Click on Setup > Customization > Modules and Fields - Click on SMS History - On Layouts tab, click on Standard - Drag and Drop LookUp from the Left Panel to the SMS History Information Layout - Enter Field Label as ‘Deal’ - Select Lookup Module as ‘Deals’ from dropdown - Enter ‘SMS Deal History’ as the Related List Title - Click on the Done button *[Image]* **Notes:** Make sure the API name for the lookup field is the same as lookup field name. To check the API Name of the lookup field, Click on Setup > Developer Space > APIs > API Names tab > SMS History. 1. Create Workflow that will perform the Lookup for the Custom Module. Follow the below steps to create a Workflow Automation - - Click on Setup > Automation > Workflow Rules - Click on **+ Create Rule** - Select the Module SMS History. - Enter a Rule Name and Description for the Custom Module for which you are creating the Lookup Workflow - Click on the **Next** button *[Image]* 1. Create a Workflow rule as shown in screenshot below - - WHEN - On a Record Action > Select Create - CONDITION - All SMS History - ACTION - Function > Write your own *[Image]* 1. Continue Creating a function with the steps below - - Enter **Function Name** - AssociateDeals i.e Associate - Enter **Display Name** - Associate Deals i.e Associate - Enter a Description(optional) - Click on the Next button - Copy and paste the below code in the Text Area MODULE_TO_BE_UPDATED = “smsmagic4__SMS_History”; LOOKUP_MODULE = “Deals”; LOOKUP_FIELD = “Deal”; PHONE_FIELD = “Mobile”; phone_list = {mobile_number,mobile_number.subString(1),mobile_number.subString(2),mobile_number.subString(3), mobile_number.subString(4)}; record_id = “”; is_record_found = False; for each  mobile in phone_list {   response = zoho.crm.searchRecords(LOOKUP_MODULE,”(“+PHONE_FIELD+”:equals:”+mobile + “)”);   for each  deal in response   { record_id = deal.get(“id”); info “Found deal with id: ” + record_id; is_record_found = True; break;   }       if(is_record_found)   { break;   } } if(is_record_found) {   info “Updating module: ” + MODULE_TO_BE_UPDATED + ” record with id: ” + target_id;   info “Updating lookup field: ” + LOOKUP_FIELD + ” with id: ” + record_id;   params = Map();    params.put(LOOKUP_FIELD,record_id.toLong());   response= zoho.crm.updateRecord(MODULE_TO_BE_UPDATED,target_id.toLong(),params);       if(“Error”.equalsIgnoreCase(response.get(“status”)))   { info “Failed to update record: ” + response.get(“message”);   }   else   {   info “Hurray! record updated successfully.”;   } } - - Click on Edit Arguments above the text area - Add the Function Arguments as seen in screenshot below - *[Image]* - Click on the **Save** button - Click on the **Save** button on the Function Editor 1. Click on the **Save** button to save the Workflow. The Workflow will be active by default. For the Outgoing and Incoming messages, from/to this custom module, the Lookup workflow will associate a relevant Module record to the SMS History record. > **Notes:** > > - Mobile number is SMS History record should exactly match with mobile field value in Custom Module (e.g., Deal).   > - Although this code takes care of country code, yet Mobile numbers in custom modules should not be formatted.