Receiving Data from Third-Party App to Go App
Go App can receive data and instructions from third-party apps. This allows the third-party app to send instructions to the Go App to target a specific SFM, load a specific record, map fields, and values, and, specify instructions to execute.
Deep Link URL Development Tips
• Create the URL and paste it on Google Keep Notes on your device. You can click the link to test the payload. When you are done testing the payload, build the same payload in your app. For errors related to the deep link, check Go App Logs.
To Receive Data from Third-Party App to Go App
Third-party App should use the following Deep Link URL:
https://go.servicemax.io/sfm/<Edit SFM Transaction ID>/<Record Id>?data-source=<field and value mapping>&mode=bg
where,
• SFM Process Name: the target Edit SFM Transaction ID. You may create a specific Edit SFM or use an existing one.
• Record Id: the 18-digit Salesforce ID.
• data-source: the field and value mapping data are passed to the target SFM using the "data-source" query parameter. Field and value mapping should be JSON payload and must be URL encoded.
• mode=bg (optional): To execute the deep link in background mode and save the data.
|
• An error is displayed if the receiving data contains fields not in the target object.
• Read-only fields are not supported.
• Creating or updating child records using deep links is not supported.
• The previous scheme definition used in the FSA of "svmx://" is now deprecated and is replaced by this deep link.
|
An example of a deep link with data mapping is as follows:
https://go.servicemax.io/sfm/[Target_SFMID]/a1f3h000000cFyJAAU?data-source=%7B%0A%20%20%22SVMXC__Service_Order_Line__c%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22SVMXC__Product__c%22%3A%20%22Auxiliary%20Adapter%22%2C%0A%20%20%20%20%20%20%22SVMXC__Date_Requested__c%22%3A%20%222020-07-15%22%2C%0A%20%20%20%20%20%20%22SVMXC__Requested_Quantity2__c%22%3A%20%222%22%2C%0A%20%20%20%20%20%20%22SVMXC__Reference_Information__c%22%3A%20%22Data%20Passed%20Via%20DeepLink%22%0A%20%20%20%20%7D%0A%20%20%5D%0A%7Dwhere,
• Edit SFM Transaction Id = [Target_SFMID]
• Record Id = a1f3h000000cFyJAAU
• data-source (URL encoded JSON payload) =
%7B%0A%20%20%22SVMXC__Service_Order_Line__c%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22SVMXC__Product__c%22%3A%20%22Auxiliary%20Adapter%22%2C%0A%20%20%20%20%20%20%22SVMXC__Date_Requested__c%22%3A%20%222020-07-15%22%2C%0A%20%20%20%20%20%20%22SVMXC__Requested_Quantity2__c%22%3A%20%222%22%2C%0A%20%20%20%20%20%20%22SVMXC__Reference_Information__c%22%3A%20%22Data%20Passed%20Via%20DeepLink%22%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D
Examples of JSON payload and its corresponding URL-encoded data are as follows:
JSON Payload:
{
"SVMXC__Service_Order_Line__c": [
{
"SVMXC__Product__c": "Auxiliary Adapter",
"SVMXC__Date_Requested__c": "2020-07-15",
"SVMXC__Requested_Quantity2__c": "2",
"SVMXC__Reference_Information__c": "Data Passed Via DeepLink"
}
]
}
URL Encoded Data:
%7B%0A%20%20%22SVMXC__Service_Order_Line__c%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22SVMXC__Product__c%22%3A%20%22Auxiliary%20Adapter%22%2C%0A%20%20%20%20%20%20%22SVMXC__Date_Requested__c%22%3A%20%222020-07-15%22%2C%0A%20%20%20%20%20%20%22SVMXC__Requested_Quantity2__c%22%3A%20%222%22%2C%0A%20%20%20%20%20%20%22SVMXC__Reference_Information__c%22%3A%20%22Data%20Passed%20Via%20DeepLink%22%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D