Class OfflineForm



  • public class OfflineForm
    extends java.lang.Object
    A form to contact the business when agents are offline.

    The offline form contains the following fields:

    Field Description Required Default value
    Message Text message from the visitor YES N/A
    VisitorInfo Information about the visitor NO Currently known visitor information
    Department ID Unique identifier of the department to receive the form NO Currently selected department

    This example shows a basic offline form build based on:

    • the provided text message
    • currently known visitor information
    • currently selected department
    
      OfflineForm offlineForm = OfflineForm.builder("This is an offline message")
                                           .build();
     

    This example shows a customised offline form built based on:

    • the provided text message
    • currently known visitor information
    • the provided department that overrides the currently selected department
    
      // Retrieved from the {@link Account} returned from {@link ChatSession#observeAccount(Observer)}
      Department department;
    
      OfflineForm offlineForm = OfflineForm.builder("This is an offline message")
                                           .withDepartment(department.getId());
                                           .build();
     

    Once created, the offline form can be submitted by calling ChatSession#sendOfflineForm(OfflineForm, ZendeskCallback).

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class and Description
      static class  OfflineForm.Builder 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static OfflineForm.Builder builder(java.lang.String message)
      Returns a builder for constructing the offline form
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • builder

        public static OfflineForm.Builder builder(java.lang.String message)
        Returns a builder for constructing the offline form
        Parameters:
        message - Non-empty message included in the offline form
        Returns:
        The builder to customise the offline form