LinkedIn
Copied!

Page instructions for embedded pages

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

The following example is 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 example is 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 example is 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 example is the post body when the DELETE page instruction is added: 

“pageInstructions” : [{
         “instruction” : “DELETE”,
         “target” : “myEmbeddedPage”
         }]
You do not need to send a content element when you use DELETE. If you delete a nested embedded page, use standard dot notation to reference the page.

myEmbeddedPage is removed from the case.

Suggest Edit
Did you find this content helpful?

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.