User can create the desired salesforce object and send the message from the same as described in below steps:




I. Creating the custom object:



1. Click Setup. 




   2. In the search box, type ‘object’ and click the Object Manager in the result displayed.




3. On right top corner, click Create then select Custom Object.





4. Enter Label and Plural Label details.




5. Scroll down and select Allow Activities.






6. Again scroll down and select Launch New Custom tab option as shown the click Save button.




7. Now click Tab Style and select the desired color.


Click Next button.



8. Select the option as shown and then click Next button.








9. Check all the check boxes and click Save button.






This is how the custom object will be added.



Giving required permissions:


10. Click Fields and Relationships option and then click New button as shown.





11. Scroll down and select Phone field and then click Next button.






12. Enter Field Label then click Next button.






13. Check the Visible checkbox then click Next button.





14. Click Save button.





Accessing the newly created custom object:


15. Now click the Object Manager button, check that the custom object is now created.




16. Or click the app launcher   and search for the newly created custom object.



17. Or check that, under More, the newly created custom object is available.



Now user can this custom object for further purpose.


This completes adding, accessing, permitting a custom object on the salesforce org.



II. Adding Send SMS button on the custom object:


Once the custom object is added, now user need to add the Send SMS button on back end with below steps.


  1. Being on the newly created custom object, click Setup and select Edit Object.




2. Select Buttons, Links and Actions as shown.




3. Click New Button or Link on right top corner.




4. Enter Label as Send SMS.


Copy the below link and paste it to the large editable box below as shown:

/apex/CloufiTwilio__SendSMS?id={!RecordId}





5. Now select {!RecordId} as pasted and select the Record ID field from the Insert Field drop down.




6. This means that {!RecordId} should be replaced with {!New_Custom_Object__c.Id} and final field should look like below:




7. Click Save button once done.


8. Click OK.


9. It will look like below after Save.




10. Now click the app launcher and select Account to go to the salesforce home page.





11. Mapping the field on SMS Configuration page.


Click the app launcher and select SMS Configuration page.





Click Settings tab, then select the newly created object name under Object Name field of the Update Mapping section.


Select field name available (Phone) and click Save Mappings button.



Confirmation message will be displayed.




This process will map the Phone field with the newly created custom object.




12. Click More then select the newly created custom object as shown.





Click New, enter mandatory details and click Save button as shown. The new record will be created.





Confirmation message will be displayed.





13. On right top corner, click the downward blue arrow which will show the newly added Send SMS button, click the same to send the message to the target phone number.







III. Adding Send SMS button on standard objects (Lead/Contact/Opportunity) in lightning:


User can Send SMS on standard objects by following below steps, switch to classic mode if earlier not:



1. Open the object where user want to add the Send SMS button e.g.: Contact.


2. Then click the particular contact where the Send SMS button is to be added.


3. Click Edit Layout link.



4. Select Mobile and Lightning Actions option.



5. Search for Send SMS text.



6. Drag the Send SMS button and drop it as displayed.




Note: For classic experience use the way as shown in below image to add Send SMS button.



7. Click Save once done.


8. Click Switch to Lightning Experience link.



9. Click Contacts tab and open the related Contact and check that the Send SMS button is now available.





This completes the flow of adding a custom object on salesforce, adding new Send SMS button, mapping the Phone field etc. in order to send a message from the custom object.