Olet tässä:
InsProviderNetworkService:getProvidersDetail
Tämä palvelu sallii sinun noutaa tarjoajien tietoja, mukaan lukien ryhmien sidonnaisuudet ja sijainnit.
Metodi:getProvidersDetail
Miten se toimii?
-
Tunnuksen avulla palvelu hakee Tarjoaja-tietuetta (Yhteyshenkilö) käyttämällä rakennettua SOQL-kyselyä ja useita sisäisiä kyselyitä, mukaan lukien siihen liittyvät tietueet.
-
Jos fieldSetName on määritetty osana syötettä, sen kenttiä käytetään Tarjoajan lisätiedot -kentässä.
-
Jos syötteessä ei ole kenttäjoukkoa, Tarjoajan tiedot (Yhteyshenkilö) sisältävät seuraavat oletusarvoiset kenttäjoukot:
-
Tunnus
-
FirstName
-
LastName
-
Sähköposti
-
Puhelin
-
Faksi
-
ProviderIdentifier__c
-
Has24x7Service__c
-
MailingStreet
-
MailingCity
-
MailingState
-
MailingPostalCode
-
MailingCountry
-
-
Tulos sisältää AccountContactRelations (tarjoajan sijainti ja tarjontaryhmä) ja seuraavat kentät:
-
AccountId
-
Account.Name (Tilin.nimi)
-
Account.RecordTypeId
-
Account.BillingStreet
-
Account.BillingCity
-
Account.BillingState
-
Account.BillingPostalCode
-
Account.BillingCountry
-
IsPrimaryRelationship__c
-
OperatingHoursId__c
-
-
Tuloksena oleva data Yhteyshenkilö-objektin esiintymän muodossa poistetaan sarjasta ja jäsennetään Map <String, Object> -kenttään ja palautetaan osana
result-noodin tulostettua JSON-tiedostoa.
Käyttäjien syöttämät tiedot
Input |
Kuvaus |
|---|---|
|
Tarjoajan tietueen tunnus |
|
Yhteyshenkilö-objektin kenttäjoukon nimi |
Syötetty JSON
JSON-syöte on muotoiltu näin:
{
"Id": <Contact Id>,
"fieldSetName": <Contact object fieldset>
}Esimerkki datan sisältävästä JSON-syötteestä:
{
"Id": "0035w0000396WMzAAM",
"fieldSetName": "ProviderFieldSet"
}Tulos-JSON
JSON-tulokset on muotoiltu näin:
{
"fieldSetName": <COntact fieldset used during service call>,
"Id": <Provider/Contact record ID used during service call>,
"result": {
"RecordTypeId": <Contact Record Type>,
"Id": <Contact record ID>,
"Field 1": <Contact object field value>,
"Field 2": <Contact object field value>,
"AccountContactRelations": {
"records": [
{
"Account": {
"Id": <Account record ID>,
"BillingCountry": <Account.BillingCountry value>,
"BillingCity": <Account.BillingCity value>,
"RecordTypeId": <Account Record Type>,
"Name": <Account.Name value>
},
"IsPrimaryRelationship__c": <Primary relationship indicator>,
"AccountId": <Account record ID>,
"Id": <AccountContactRelation record ID>,
"ContactId": <Contact record ID>
}
"done": true,
"totalSize": <AccountContactRelations count>
}
},
"error": "OK"
}Esimerkki datan sisältävästä JSON-tuloksesta.
{
"fieldSetName": "ProviderFieldSet",
"Id": "0035w0000396WMzAAM",
"result": {
"RecordTypeId": "0125w000001FVCuAAO",
"Id": "0035w0000396WMzAAM",
"Email": "lesliejohann@email.com",
"Name": "Leslie Johann",
"AccountContactRelations": {
"records": [
{
"Account": {
"Id": "0015w00002EiEyNAAV",
"BillingCountry": "Germany",
"BillingCity": "Berlin",
"RecordTypeId": "0125w000001FVChAAO",
"Name": "Berlin Facility (Location)"
},
"IsPrimaryRelationship__c": false,
"AccountId": "0015w00002EiEyNAAV",
"Id": "07k5w00000JPRM0AAP",
"ContactId": "0035w0000396WMzAAM"
},
{
"Account": {
"Id": "0015w00002EiF2KAAV",
"RecordTypeId": "0125w000001FVCgAAO",
"Name": "First EU Medical Group"
},
"IsPrimaryRelationship__c": false,
"AccountId": "0015w00002EiF2KAAV",
"Id": "07k5w00000JPRMFAA5",
"ContactId": "0035w0000396WMzAAM"
}
],
"done": true,
"totalSize": 2
}
},
"error": "OK"
}
