Use the Scratchpad to complete your request fulfillment tasks
Summarize
Summary of Use the Scratchpad to Complete Your Request Fulfillment Tasks
The Scratchpad feature in the Service Exchange application allows providers to send updates to a consumer's ServiceNow instance during request fulfillment tasks. This process is essential for the Zero Touch request flow, where updates are communicated upon successful completion of confirmation and shipment tasks.
Show less
Key Features
- Task Confirmation: When confirming a provider task, send a Scratchpad update with the order status set to "confirmed." Use the PSBScratchpadUtil API for this purpose, with a specific code format to ensure proper functionality.
- Shipment Updates: Upon shipping requested items, send a Scratchpad update detailing the order status as either "partiallyshipped" or "fullyshipped," alongside information about the shipped assets, such as tracking number, carrier, model number, asset tag, and serial number.
- Unique Tracking: Each shipment should have a unique tracking number, and details like asset tag and serial number are relevant only for non-consumable assets.
Key Outcomes
By implementing the Scratchpad updates correctly, providers can ensure that their consumers receive timely notifications regarding the status of their requests. This enhances communication, streamlines operations, and facilitates a smoother fulfillment experience within the ServiceNow instance.
As a provider, use the Scratchpad feature of the Service Exchange application to send updates to the ServiceNow instance of your consumer while performing the request fulfillment tasks.
The Zero Touch request flow requires you to send Scratchpad updates to your consumer's ServiceNow instance when you complete the confirmation and shipment tasks successfully. Based on the updates that you send, the Zero Touch flow progresses on your consumer's ServiceNow instance.
You must include the code specific to your tasks in the PSBScratchpadUtil API. For more information, see Using the Scratchpad for Service Exchange tasks. Confirm that the Scratchpad codes associated with the tasks of your request fulfillment flow are in the following format.
Sample code for request confirmation
var scratchPadJSON = {
"orderStatus": "confirmed"
};
var value = JSON.stringify(scratchPadJSON);
var rtGR = new GlideRecord("sn_sb_pro_provider_task");
rtGR.get(<ProviderTaskID>);
if (rtGR.isValidRecord()) {
var util = new sn_sb_pro.PSBScratchpadUtil();
util.update(rtGR, "confirmation", value);
}
When you confirm a provider task, a Scratchpad update with the order status as Confirmed is sent to your consumer's ServiceNow instance.
Sample code for shipment
var scratchPadJSON = {
"orderStatus": "partially_shipped / fully_shipped"
"orderLineItems" :
[{
"status": "shipped",
"trackingNumber": "123",
"carrier": "C1",
"modelNumber": 'MD322LL/A',
"assetTag": 'P1000177',
"serialNumber": 'P1000177'
},{
"status": "shipped",
"trackingNumber": "123",
"carrier": "C1",
"modelNumber": 'MD322LL/A',
"assetTag": 'P1000178',
"serialNumber": 'P1000178'
}
]
};
- Order
status: Depending on how the provider has shipped the assets in a request, the Order status can have the following values:
- partially_shipped: Assets in the request are shipped through multiple shipments.
- fully_shipped: All the assets in the request are shipped.
- Tracking number: Every shipment has a unique tracking number.
- Carrier: The name of the carrier through which the provider shipped the assets.
- Model number: Unique model number of the asset that is shipped.
- Asset tag: Unique asset tag of the asset that is shipped.
- Serial number: Serial number of the asset.