By Mrityunjoy Chowdhury: Bulk Shift upload with recurring Shift and Add multiple topic and channel
Bulk Upload Shift for Recurring Shift
Follow the previous steps to know how to upload shift in bulk.
https://help.salesforce.com/s/articleView?id=sf.ls_create_shifts_in_bulk_from_a_csv_file.htm&type=5
Bulk Recurring Shift recording
Bulk Shift Topic and Channel recording
In recurring shift we have added 2 new fields which will allow users to upload daily weekly and monthly shift. A sample request payload is given below for the steps 7 in the above doc.
Recurring Shift request payload
StartTime,EndTime,ServiceResourceId,ServiceTerritoryId,Status,TimeSlotType,WorkTypeGroupId,WorkTypeId,Type,RecurrencePattern
2022-07-08T03:30:00.000Z,2022-07-08T09:30:00.000Z,0Hnx000000007mGCAQ,0Hhx00000002LzGCAU,Confirmed,Normal,,,Recurring,RRULE:FREQ=DAILY;INTERVAL=3;UNTIL=20221120T000000Z
New Fields are added
- Type: Recurring /Regular
- RecurrencePattern : recurring pattern for daily monthly and weekly. Sample
Bulk shift upload for multiple Topic (Work type Groups) when health Cloud is disabled.
- Upload Appointment topic(Work Type Groups) to Shift
- Create the Shift and get the Shift Id for which the user want to add multple topic
- Get all the Work Type Group id which user wants want to add to shift
- Create the CSV file like below
- Conver this to CSV file format
ShiftId,WorkTypeId,WorkTypeGroupId,AreAllTopicsSupported
0a0x000000003Q6AAI,,,TRUE
0a0x000000005kuAAA,,,TRUE
0a0x000000003QBAAY,,0VSx00000002UgzGAE,
0a0x000000003QBAAY,,0VSx00000002Uh4GAE,
- Call bulk API below
a.
URI | /services/data/<version number>/jobs/ingestExample: /services/data/v54.0/jobs/ingest |
HTTP Method | POST |
Headers | Content-Type: application/json; charset=UTF-8Accept: application/json |
Request Body | {“object”:”ShiftWorkTopic”,”contentType”:”CSV”,”operation”:”insert”,”lineEnding”:”CRLF”} |
B.
RI | /services/data/<version number>/jobs/ingest/<job Id>/batchesUse the contentUrl from the POST method and append a forward slash (/) at its beginning.Example:/services/data/v54.0/jobs/ingest/7505j000005JqZrAAK/batches |
HTTP Method | PUT |
Headers | Content-Type: text/csvAccept: application/json |
Request Body | The contents of the CSV file. Example:ShiftId,WorkTypeId,WorkTypeGroupId,AreAllTopicsSupported0a0x000000003Q6AAI,,,TRUE0a0x000000005kuAAA,,,TRUE0a0x000000003QBAAY,,0VSx00000002UgzGAE,0a0x000000003QBAAY,,0VSx00000002Uh4GAE, |
C. Rest same from steps number 8 from above reference doc
Bulk shift upload for multiple channels and multiple topic
- Upload Channel to Shift
- Create the Shift and get the Shift Id for which the user want to add multple chanel
- Get all the channel Id which user wants want to add to shift
- Create the CSV file like below
Conver this to CSV file format
ShiftId,EngagementChannelTypeId,AreAllEngmtChnlSupported
0a0x000000005vZAAQ,0eFx00000000006EAA,
0a0x000000005vaAAA,0eFx00000000006EAA,
0a0x000000005vaAAA,0eFx0000000000BEAQ,
0a0x000000005vbAAA,,TRUE
0a0x000000005vcAAA,,TRUE
URI | /services/data/<version number>/jobs/ingestExample: /services/data/v54.0/jobs/ingest |
HTTP Method | POST |
Headers | Content-Type: application/json; charset=UTF-8Accept: application/json |
Request Body | {“object”:”ShiftEngagementChannel”,”contentType”:”CSV”,”operation”:”insert”,”lineEnding”:”CRLF”} |
URI | /services/data/<version number>/jobs/ingest/<job Id>/batchesUse the contentUrl from the POST method and append a forward slash (/) at its beginning.Example:/services/data/v54.0/jobs/ingest/7505j000005JqZrAAK/batches |
HTTP Method | PUT |
Headers | Content-Type: text/csvAccept: application/json |
Request Body | The contents of the CSV file. Example:ShiftId,EngagementChannelTypeId,AreAllEngmtChnlSupported0a0x000000005vZAAQ,0eFx00000000006EAA,0a0x000000005vaAAA,0eFx00000000006EAA,0a0x000000005vaAAA,0eFx0000000000BEAQ,0a0x000000005vbAAA,,TRUE0a0x000000005vcAAA,,TRUE |
Rest same from steps number 8 from above reference doc