Get Dummy Service Resource

Show your users the dummy resource and its availability based on the selected work type group and service territory.

  1. Create a page to show your users dummy service resources.

  2. Make a POST request on the getAppointmentCandidates REST API by passing the required workTypeGroupId and territoryIds parameters. Set allowConcurrentScheduling to true to get concurrent time slots for the dummy resource.

    Specify the operating hour scheduling policy ID to show only the dummy resource who’s defined with operating hours for concurrent scheduling. See Configure Scheduling Policy to Enforce Operating Hours.

    Note

    Resource URI

    1https://YOUR_INSTANCE.salesforce.com/services/data/v68.0/scheduling/getAppointmentCandidates

    Where YOUR_INSTANCE is a variable.

    Sample Request

    1{
    2  "startTime": "2022-10-01T00:00:00.000Z",
    3  "endTime": "2022-10-08T20:00:00.000Z",
    4  "allowConcurrentScheduling": true,
    5  "schedulingPolicyId": "0VrS7000000004XKAQ",
    6  "filterByResources": [
    7    "0HnS70000004EFyKAM"
    8  ],
    9  "workTypeGroupId": "0VSS70000004DvWOAU",
    10  "territoryIds": [
    11    "0HhS70000004F9zKAE"
    12  ]
    13}

    Sample Response

    The API returns the service resources and available time slots.

    1{
    2  "candidates": [
    3    {
    4      "endTime": "2022-10-03T16:30:00.000+0000",
    5      "resources": [
    6        "0HnS70000004EFyKAM"
    7      ],
    8      "startTime": "2022-10-03T16:00:00.000+0000",
    9      "territoryId": "0HhS70000004F9zKAE"
    10    },
    11    {
    12      "endTime": "2022-10-03T17:00:00.000+0000",
    13      "resources": [
    14        "0HnS70000004EFyKAM"
    15      ],
    16      "startTime": "2022-10-03T16:30:00.000+0000",
    17      "territoryId": "0HhS70000004F9zKAE"
    18    },
    19    {
    20      "endTime": "2022-10-03T17:30:00.000+0000",
    21      "resources": [
    22        "0HnS70000004EFyKAM"
    23      ],
    24      "startTime": "2022-10-03T17:00:00.000+0000",
    25      "territoryId": "0HhS70000004F9zKAE"
    26    },
    27    {
    28      "endTime": "2022-10-03T18:00:00.000+0000",
    29      "resources": [
    30        "0HnS70000004EFyKAM"
    31      ],
    32      "startTime": "2022-10-03T17:30:00.000+0000",
    33      "territoryId": "0HhS70000004F9zKAE"
    34    },
    35    {
    36      "endTime": "2022-10-03T18:30:00.000+0000",
    37      "resources": [
    38        "0HnS70000004EFyKAM"
    39      ],
    40      "startTime": "2022-10-03T18:00:00.000+0000",
    41      "territoryId": "0HhS70000004F9zKAE"
    42    },
    43    {
    44      "endTime": "2022-10-03T19:00:00.000+0000",
    45      "resources": [
    46        "0HnS70000004EFyKAM"
    47      ],
    48      "startTime": "2022-10-03T18:30:00.000+0000",
    49      "territoryId": "0HhS70000004F9zKAE"
    50    },
    51    {
    52      "endTime": "2022-10-03T19:30:00.000+0000",
    53      "resources": [
    54        "0HnS70000004EFyKAM"
    55      ],
    56      "startTime": "2022-10-03T19:00:00.000+0000",
    57      "territoryId": "0HhS70000004F9zKAE"
    58    },
    59    {
    60      "endTime": "2022-10-03T20:00:00.000+0000",
    61      "resources": [
    62        "0HnS70000004EFyKAM"
    63      ],
    64      "startTime": "2022-10-03T19:30:00.000+0000",
    65      "territoryId": "0HhS70000004F9zKAE"
    66    },
    67    {
    68      "endTime": "2022-10-03T20:30:00.000+0000",
    69      "resources": [
    70        "0HnS70000004EFyKAM"
    71      ],
    72      "startTime": "2022-10-03T20:00:00.000+0000",
    73      "territoryId": "0HhS70000004F9zKAE"
    74    },
    75    {
    76      "endTime": "2022-10-03T21:00:00.000+0000",
    77      "resources": [
    78        "0HnS70000004EFyKAM"
    79      ],
    80      "startTime": "2022-10-03T20:30:00.000+0000",
    81      "territoryId": "0HhS70000004F9zKAE"
    82    },
    83    {
    84      "endTime": "2022-10-03T21:30:00.000+0000",
    85      "resources": [
    86        "0HnS70000004EFyKAM"
    87      ],
    88      "startTime": "2022-10-03T21:00:00.000+0000",
    89      "territoryId": "0HhS70000004F9zKAE"
    90    },
    91    {
    92      "endTime": "2022-10-03T22:00:00.000+0000",
    93      "resources": [
    94        "0HnS70000004EFyKAM"
    95      ],
    96      "startTime": "2022-10-03T21:30:00.000+0000",
    97      "territoryId": "0HhS70000004F9zKAE"
    98    },
    99    {
    100      "endTime": "2022-10-03T22:30:00.000+0000",
    101      "resources": [
    102        "0HnS70000004EFyKAM"
    103      ],
    104      "startTime": "2022-10-03T22:00:00.000+0000",
    105      "territoryId": "0HhS70000004F9zKAE"
    106    },
    107    {
    108      "endTime": "2022-10-03T23:00:00.000+0000",
    109      "resources": [
    110        "0HnS70000004EFyKAM"
    111      ],
    112      "startTime": "2022-10-03T22:30:00.000+0000",
    113      "territoryId": "0HhS70000004F9zKAE"
    114    },
    115    {
    116      "endTime": "2022-10-03T23:30:00.000+0000",
    117      "resources": [
    118        "0HnS70000004EFyKAM"
    119      ],
    120      "startTime": "2022-10-03T23:00:00.000+0000",
    121      "territoryId": "0HhS70000004F9zKAE"
    122    },
    123    {
    124      "endTime": "2022-10-04T00:00:00.000+0000",
    125      "resources": [
    126        "0HnS70000004EFyKAM"
    127      ],
    128      "startTime": "2022-10-03T23:30:00.000+0000",
    129      "territoryId": "0HhS70000004F9zKAE"
    130    },
    131    {
    132      "endTime": "2022-10-04T00:30:00.000+0000",
    133      "resources": [
    134        "0HnS70000004EFyKAM"
    135      ],
    136      "startTime": "2022-10-04T00:00:00.000+0000",
    137      "territoryId": "0HhS70000004F9zKAE"
    138    },
    139    {
    140      "endTime": "2022-10-04T01:00:00.000+0000",
    141      "resources": [
    142        "0HnS70000004EFyKAM"
    143      ],
    144      "startTime": "2022-10-04T00:30:00.000+0000",
    145      "territoryId": "0HhS70000004F9zKAE"
    146    },
    147    {
    148      "endTime": "2022-10-04T01:30:00.000+0000",
    149      "resources": [
    150        "0HnS70000004EFyKAM"
    151      ],
    152      "startTime": "2022-10-04T01:00:00.000+0000",
    153      "territoryId": "0HhS70000004F9zKAE"
    154    },
    155    {
    156      "endTime": "2022-10-04T02:00:00.000+0000",
    157      "resources": [
    158        "0HnS70000004EFyKAM"
    159      ],
    160      "startTime": "2022-10-04T01:30:00.000+0000",
    161      "territoryId": "0HhS70000004F9zKAE"
    162    },
    163    {
    164      "endTime": "2022-10-04T02:30:00.000+0000",
    165      "resources": [
    166        "0HnS70000004EFyKAM"
    167      ],
    168      "startTime": "2022-10-04T02:00:00.000+0000",
    169      "territoryId": "0HhS70000004F9zKAE"
    170    },
    171    {
    172      "endTime": "2022-10-04T03:00:00.000+0000",
    173      "resources": [
    174        "0HnS70000004EFyKAM"
    175      ],
    176      "startTime": "2022-10-04T02:30:00.000+0000",
    177      "territoryId": "0HhS70000004F9zKAE"
    178    },
    179    {
    180      "endTime": "2022-10-04T03:30:00.000+0000",
    181      "resources": [
    182        "0HnS70000004EFyKAM"
    183      ],
    184      "startTime": "2022-10-04T03:00:00.000+0000",
    185      "territoryId": "0HhS70000004F9zKAE"
    186    },
    187    {
    188      "endTime": "2022-10-04T04:00:00.000+0000",
    189      "resources": [
    190        "0HnS70000004EFyKAM"
    191      ],
    192      "startTime": "2022-10-04T03:30:00.000+0000",
    193      "territoryId": "0HhS70000004F9zKAE"
    194    },
    195    {
    196      "endTime": "2022-10-04T16:30:00.000+0000",
    197      "resources": [
    198        "0HnS70000004EFyKAM"
    199      ],
    200      "startTime": "2022-10-04T16:00:00.000+0000",
    201      "territoryId": "0HhS70000004F9zKAE"
    202    },
    203    {
    204      "endTime": "2022-10-04T17:00:00.000+0000",
    205      "resources": [
    206        "0HnS70000004EFyKAM"
    207      ],
    208      "startTime": "2022-10-04T16:30:00.000+0000",
    209      "territoryId": "0HhS70000004F9zKAE"
    210    },
    211    {
    212      "endTime": "2022-10-04T17:30:00.000+0000",
    213      "resources": [
    214        "0HnS70000004EFyKAM"
    215      ],
    216      "startTime": "2022-10-04T17:00:00.000+0000",
    217      "territoryId": "0HhS70000004F9zKAE"
    218    },
    219    {
    220      "endTime": "2022-10-04T18:00:00.000+0000",
    221      "resources": [
    222        "0HnS70000004EFyKAM"
    223      ],
    224      "startTime": "2022-10-04T17:30:00.000+0000",
    225      "territoryId": "0HhS70000004F9zKAE"
    226    },
    227    {
    228      "endTime": "2022-10-04T18:30:00.000+0000",
    229      "resources": [
    230        "0HnS70000004EFyKAM"
    231      ],
    232      "startTime": "2022-10-04T18:00:00.000+0000",
    233      "territoryId": "0HhS70000004F9zKAE"
    234    },
    235    {
    236      "endTime": "2022-10-04T19:00:00.000+0000",
    237      "resources": [
    238        "0HnS70000004EFyKAM"
    239      ],
    240      "startTime": "2022-10-04T18:30:00.000+0000",
    241      "territoryId": "0HhS70000004F9zKAE"
    242    },
    243    {
    244      "endTime": "2022-10-04T19:30:00.000+0000",
    245      "resources": [
    246        "0HnS70000004EFyKAM"
    247      ],
    248      "startTime": "2022-10-04T19:00:00.000+0000",
    249      "territoryId": "0HhS70000004F9zKAE"
    250    },
    251    {
    252      "endTime": "2022-10-04T20:00:00.000+0000",
    253      "resources": [
    254        "0HnS70000004EFyKAM"
    255      ],
    256      "startTime": "2022-10-04T19:30:00.000+0000",
    257      "territoryId": "0HhS70000004F9zKAE"
    258    },
    259    {
    260      "endTime": "2022-10-04T20:30:00.000+0000",
    261      "resources": [
    262        "0HnS70000004EFyKAM"
    263      ],
    264      "startTime": "2022-10-04T20:00:00.000+0000",
    265      "territoryId": "0HhS70000004F9zKAE"
    266    },
    267    {
    268      "endTime": "2022-10-04T21:00:00.000+0000",
    269      "resources": [
    270        "0HnS70000004EFyKAM"
    271      ],
    272      "startTime": "2022-10-04T20:30:00.000+0000",
    273      "territoryId": "0HhS70000004F9zKAE"
    274    },
    275    {
    276      "endTime": "2022-10-04T21:30:00.000+0000",
    277      "resources": [
    278        "0HnS70000004EFyKAM"
    279      ],
    280      "startTime": "2022-10-04T21:00:00.000+0000",
    281      "territoryId": "0HhS70000004F9zKAE"
    282    },
    283    {
    284      "endTime": "2022-10-04T22:00:00.000+0000",
    285      "resources": [
    286        "0HnS70000004EFyKAM"
    287      ],
    288      "startTime": "2022-10-04T21:30:00.000+0000",
    289      "territoryId": "0HhS70000004F9zKAE"
    290    },
    291    {
    292      "endTime": "2022-10-04T22:30:00.000+0000",
    293      "resources": [
    294        "0HnS70000004EFyKAM"
    295      ],
    296      "startTime": "2022-10-04T22:00:00.000+0000",
    297      "territoryId": "0HhS70000004F9zKAE"
    298    },
    299    {
    300      "endTime": "2022-10-04T23:00:00.000+0000",
    301      "resources": [
    302        "0HnS70000004EFyKAM"
    303      ],
    304      "startTime": "2022-10-04T22:30:00.000+0000",
    305      "territoryId": "0HhS70000004F9zKAE"
    306    },
    307    {
    308      "endTime": "2022-10-04T23:30:00.000+0000",
    309      "resources": [
    310        "0HnS70000004EFyKAM"
    311      ],
    312      "startTime": "2022-10-04T23:00:00.000+0000",
    313      "territoryId": "0HhS70000004F9zKAE"
    314    },
    315    {
    316      "endTime": "2022-10-05T00:00:00.000+0000",
    317      "resources": [
    318        "0HnS70000004EFyKAM"
    319      ],
    320      "startTime": "2022-10-04T23:30:00.000+0000",
    321      "territoryId": "0HhS70000004F9zKAE"
    322    },
    323    {
    324      "endTime": "2022-10-05T00:30:00.000+0000",
    325      "resources": [
    326        "0HnS70000004EFyKAM"
    327      ],
    328      "startTime": "2022-10-05T00:00:00.000+0000",
    329      "territoryId": "0HhS70000004F9zKAE"
    330    },
    331    {
    332      "endTime": "2022-10-05T01:00:00.000+0000",
    333      "resources": [
    334        "0HnS70000004EFyKAM"
    335      ],
    336      "startTime": "2022-10-05T00:30:00.000+0000",
    337      "territoryId": "0HhS70000004F9zKAE"
    338    },
    339    {
    340      "endTime": "2022-10-05T01:30:00.000+0000",
    341      "resources": [
    342        "0HnS70000004EFyKAM"
    343      ],
    344      "startTime": "2022-10-05T01:00:00.000+0000",
    345      "territoryId": "0HhS70000004F9zKAE"
    346    },
    347    {
    348      "endTime": "2022-10-05T02:00:00.000+0000",
    349      "resources": [
    350        "0HnS70000004EFyKAM"
    351      ],
    352      "startTime": "2022-10-05T01:30:00.000+0000",
    353      "territoryId": "0HhS70000004F9zKAE"
    354    },
    355    {
    356      "endTime": "2022-10-05T02:30:00.000+0000",
    357      "resources": [
    358        "0HnS70000004EFyKAM"
    359      ],
    360      "startTime": "2022-10-05T02:00:00.000+0000",
    361      "territoryId": "0HhS70000004F9zKAE"
    362    },
    363    {
    364      "endTime": "2022-10-05T03:00:00.000+0000",
    365      "resources": [
    366        "0HnS70000004EFyKAM"
    367      ],
    368      "startTime": "2022-10-05T02:30:00.000+0000",
    369      "territoryId": "0HhS70000004F9zKAE"
    370    },
    371    {
    372      "endTime": "2022-10-05T03:30:00.000+0000",
    373      "resources": [
    374        "0HnS70000004EFyKAM"
    375      ],
    376      "startTime": "2022-10-05T03:00:00.000+0000",
    377      "territoryId": "0HhS70000004F9zKAE"
    378    },
    379    {
    380      "endTime": "2022-10-05T04:00:00.000+0000",
    381      "resources": [
    382        "0HnS70000004EFyKAM"
    383      ],
    384      "startTime": "2022-10-05T03:30:00.000+0000",
    385      "territoryId": "0HhS70000004F9zKAE"
    386    }
    387  ]
    388}
  3. Parse the JSON response, and show the dummy resource on a page that you created. Your users can select the dummy resource for the appointment.

On the next page, you can show the appointment details for the user to review and create the appointment.