SAP Knowledge Base Article - Public

2976724 - How to upsert with association for Custom MDF Objects in SuccessFactors OData API (inline)


You are trying to upsert records in parent/child entities using inline / associations of OData entities (like EC and MDF, MDF to MDF, etc).

This KBA will share samples of OData JSON and XML format with inline upserts (parent and child) in the same request payload.

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.


  • SAP SuccessFactors HXM Suite
  • SAP SuccessFactors Employee central
  • OData API


Find below samples that you can use to build the same logic in your side.

Inline operation sample

JSON format

Request URL

  • /odata/v2/upsert?$format=json



                "__metadata": {

                    "uri": "cust_Contract(effectiveStartDate=datetime'2000-01-01T00:00:00',externalCode='372TD06A2F1_ST')",

                    "type": "SFOData.cust_Contract"


                "externalCode": "372TD06A2F1_ST",

                "effectiveStartDate": "/Date(946684800000)/",

                "cust_VW": {

                            "__metadata": {

                                "uri": "cust_AmandaVW1(effectiveStartDate=datetime'2000-01-01T00:00:00',externalCode='vw5')",

                                "type": "SFOData.cust_AmandaVW1"


                            "externalCode": "vw5",

                            "effectiveStartDate": "/Date(946684800000)/"




Atom format (XML)

Request URL

  • /odata/v2/upsert


<?xml version="1.0" encoding="utf-8"?>

<feed xmlns="" xmlns:m="" xmlns:d="" xml:base="">

    <title type="text">cust_Contract</title>



    <link rel="self" title="cust_Contract" href="cust_Contract"></link>



        <title type="text"></title>





        <link rel="edit" title="cust_Contract" href="cust_Contract(effectiveStartDate=datetime'2000-01-01T00:00:00',externalCode='372TD06A2F1_ST')"></link>

        <link rel="" type="application/atom+xml;type=feed" title="cust_VW" href="cust_AmandaVW1(effectiveStartDate=datetime'2000-01-01T00:00:00',externalCode='vw2')">


        <category term="SFOData.cust_Contract" scheme=""></category>

        <content type="application/xml">



                <d:effectiveStartDate m:type="Edm.DateTime">2000-01-01T00:00:00</d:effectiveStartDate>

                <d:cust_description>Ray Whelton.</d:cust_description>

                <d:cust_Status m:null="true"></d:cust_Status>

                <d:externalName>Ray Whelton.</d:externalName>






Record created in Atom/XML format too.

Please use the sample above to work with SF OData MDF, EC, and other entities using inline / parent/child upserts.


inline, MDF, parent, child, upsert, OData, SuccessFactors HCM HXM Suite, API, navigation. JSON, XML, Atom, samples, custom objects , KBA , LOD-SF-INT , Integrations , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT-MDF , Metadata Framework API (MDF) , LOD-SF-INT-EC , Employee Central SFAPI & OData Entities , How To


SAP SuccessFactors Employee Central all versions ; SAP SuccessFactors HCM suite all versions