Page instructions for embedded pages

You can use the following page instructions to specify whether an embedded page within the post data is to be updated, replaced, or removed from your case.

The following is an example of a case before a page instruction is added.
myEmbeddedPage
.Prop1 – “value1”
.Prop2 – “value2”

UPDATE

You use UPDATE to add a new field to an embedded page.

The following is an example of the post body when the UPDATE page instruction is added.

“pageInstructions” : [{
            “instruction” : “UPDATE”,
            “target” : “myEmbeddedPage”,
            content : {
                    “Prop3” : “value3”,
            }
        }]

.Prop3 - "value3" is added to the embedded page.

myEmbeddedPage
.Prop1 – “value1”
.Prop2 – “value2”
.Prop3 – “value3”

REPLACE

You use REPLACE to replace an existing embedded page with a new embedded page.

The following is an example of the post body when the REPLACE page instruction is added.

“pageInstructions” : [{
            “instruction” : “REPLACE”,
            “target” : “myEmbeddedPage”,
             content : {
                    “Prop3” : “value3”,
            }
         }]

The .Prop1 – “value1” and .Prop2 – “value2” properties in your case are replaced with the “Prop3” : “value3” property that you specified in the content section of the post body.

myEmbeddedPage
.Prop3 – “value3”

DELETE

You use DELETE to delete an embedded page.

The following is an example of the post body when the DELETE page instruction is added. You do not need to send a content element when you use DELETE.

If you are deleting a nested embedded page, use standard dot notation to reference the page.

“pageInstructions” : [{
         “instruction” : “DELETE”,
         “target” : “myEmbeddedPage”
         }]

myEmbeddedPage is removed from the case.