MapEntity API
  • 1 Minute to read
  • Dark
    Light
  • PDF

MapEntity API

  • Dark
    Light
  • PDF

Article summary

Usage

Use this API to map templates to entities.

Sample Request

In this example an Workforce template is mapped to two entities "1000-USD" and "Test-New".

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:ns="http://www.Planful.com/API/SOAP/StateFree/Common/2009/03/19">
<soapenv:Header/>
<soapenv:Body>
	  <ns:MapEntity>
<ns:TenantCode>WFPGF</ns:TenantCode>
<ns:LoginName>benbradley@planful.com</ns:LoginName>
<ns:Password>password</ns:Password>
<ns:ScenarioCode>Budget 2017</ns:ScenarioCode>
<ns:templateCode>HR</ns:templateCode>
<ns:budgetEntities>
<!--Zero or more repetitions:-->
<ns:string>Test-New</ns:string>
<ns:string>1000-USD</ns:string>
</ns:budgetEntities>
</ns:MapEntity>
</soapenv:Body>
</soapenv:Envelope>

To avoid duplicates, if you try to map the same entities again, the following message is displayed.

  <MapEntityResult>
<Status>Success</Status>
<MapStatus>
<string>1000-USD-ALREADY MAPPED</string>
</MapStatus)
  </MapEntityResult>

When an invalid entity is mapped, the following message is displayed.

  <MapEntityResult>
<Status>Fail</Status>
<MapStatus>
<string>srintnata-INVALID</string>
</MapStatus)
  </MapEntityResult>

Sample Response with Invalid Entity

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<MapEntityResponse 
xmlns="http://www.Planful.com/API/SOAP/StateFree/Common/2009/03/19">
<MapEntityResult>
<Status>Fail</Status>
<MapStatus>
<string>asdfasdfasdfa-INVALID</string>
</MapStatus>
</MapEntityResult>
</MapEntityResponse>
</soap:Body>
</soap:Envelope>

Was this article helpful?