Configure Custom Objects
  • 14 Oct 2024
  • 3 Minutes to read
  • Dark
    Light

Configure Custom Objects

  • Dark
    Light

Article summary

Use the steps below to configure a custom object for SMS messaging. You will need to add a lookup field on the SMS Message object and create a new field on the custom object. For this example, we are using the Attendee object.

SMS Object

Create a Custom Object Lookup Field

  1. Go to Setup.

  2. Click the Object Manager tab.

  3. In the Quick Find box, enter and click “SMS Message.”

  4. Click the Field & Relationships tab.

  5. Click New.

  6. Select “Lookup Relationship” and click Next.
     Messaging_CreateLookupField_1

  7. Set Related To to “Attendee” and click Next.
     Messaging_CreateLookupField_2

  8. Enter the following information.

    • Field Label: “Attendee”

    • Field Name: “Attendee”

    • Help Text: “The Attendee who is related to this SMS message”

    • Child Relationship Name = “SMS_Message”

    • Set the remaining fields based on your requirements.
       Messaging_CreateLookupField_3

  9. Click Next.

  10. Select the profile access for this field.

  11. Click Next.

  12. Make sure the new field will be added to the page layout.
     Messaging_CreateLookupField_4

  13. Click Next.

  14. Enter a Related List Label.
     Messaging_CreateLookupField_5

  15. Click Save.

Messaging will now detect the relationship between the SMS Message and Attendee objects. You can also add the Messaging Messenger component to this object's page and create SMS Templates for this object.

Custom Object

Create a Do Not SMS Field

  1. Go to Setup.

  2. Click the Object Manager tab.

  3. In the Quick Find box, enter and click “Attendee.”

  4. Click the Fields & Relationships tab.

  5. Click New.

  6. Select “Checkbox” and click Next.
     Messaging_UpdateCustomObject_1

  7. Enter the following information.

    • Field Label: “Do Not SMS”

    • Field Name: “Do_Not_SMS”

    • Help Text: “Check this box to stop an SMS message from being sent to this Attendee.”

    • Set the remaining fields based on your requirements.
       Messaging_UpdateCustomObject_2

  8. Click Next.

  9. Select the profile access for this field.

  10. Click Next.

  11. Make sure the new field will be added to the page layout.
     Messaging_UpdateCustomObject_3

  12. Click Save.
     Messaging_UpdateCustomObject_4

Create a Data Type Phone Field

To send SMS messages to a custom object, the custom object needs a Phone field that has Data Type = "Phone." Messaging will not detect phone numbers in text fields.

  1. Go to Setup.

  2. Click the Object Manager tab.

  3. In the Quick Find box, enter and click “Attendee.”

  4. Click the Fields & Relationships tab.

  5. Click New.

  6. Select “Phone” and click Next.
     Messaging_CreatePhoneDataField_1

  7. Enter the following information.

    • Field Label: “Phone”

    • Field Name: “SMS_Phone

    • Help Text: "Use this phone number to send to send SMS messages.”

    • Set the remaining fields based on your requirements.
       Messaging_CreatePhoneDataField_2

  8. Click Next.

  9. Select the profile access for this field.

  10. Click Next.

  11. Make sure the new field will be added to the page layout.
     Messaging_CreatePhoneDataField_3

  12. Click Save.

Lightning

Update the Page Layout and Related List

Add the Do Not SMS Field

  1. Go to Setup.

  2. Click the Object Manager tab.

  3. In the Quick Find box, search for and click “Attendee.”

  4. Click the Page Layouts tab.

  5. Select the layout type you need to update.

  6. Click the Fields tab.

  7. In the Quick Find box, search for the Do Not SMS field.

  8. Drag and drop the Do Not SMS field onto the page layout.

Messaging_Custom_Add DoNotSMS Field

Add the Related List

  1. Click the Related Lists tab.

  2. In the Quick Find box, search for the “SMS Messages” Related List.

  3. Drag and drop the Related List onto the page layout.

  4. Click the Wrench icon to open the Properties for this related list.

    Messaging_Custom_Add Related List

  5. Add these fields in the following order:

    1. Message Date

    2. Direction

    3. Message (Full)

    4. Status

    5. From Phone

    6. To Phone

    7. SMS Message Number

  6. In the Sort By drop-down, choose "SMS Message Number" and "Descending".

  7. Click the plus sign (+) located in the Buttons section.

  8. Uncheck the box next to New and click Ok.

  9. Click Save.

Lightning Record Page Layout

  1. Click the Lightning Record Pages tab.

  2. Click the name of the layout you want to modify. 

  3. Click Edit.

  4. If you don't see any Lightning page layouts listed, complete the following steps.

    1. Click New

    2. Choose Record Page. 

    3. Click Next

    4. Enter a Label (i.e. Attendee Layout). 

    5. Set Object = “Attendee.” 

    6. Click Next

    7. Click the Clone Salesforce Default Page tab. 

    8. Choose a layout.

    9. Click Done.

  5. You should now be in the Lightning App Builder. 

  6. On the left-hand navigation bar, scroll down to the Custom-Managed section.

  7. Locate the Blackthorn Messaging Messenger component.

  8. Drag and drop the component onto the page layout. 

  9. The right-hand column will have the configuration options. We recommend keeping the Max Height (in pixels) = "400px", but you can modify it as needed.

  10. If you've added the component to a sidebar, set Column(s) = “One Column.”

  11. If you've added it to a wide section of the page, you can set Column(s) = “Two Column” to maximize the space.

  12. Click Save.

    Messaging_Custom_Lightning

  13. Click Activation

  14. Review the settings.

  15. Click Close. Refresh your browser for the changes to take effect.

  16. Open an Attendee record to see the Blackthorn Messaging Messenger component on your page.

Messaging_Custom_Attendee Record