Web app to update a custom schema other than recipient schema | Community
Skip to main content
Level 2
August 31, 2021
Question

Web app to update a custom schema other than recipient schema

  • August 31, 2021
  • 2 replies
  • 3819 views

Hello Everyone,

I want to build a simple web app that updates to a custom schema (offerActivation schema). When I am selecting the document type in the web as offerActivation schema and sending the link in an email and trying to open that link, it is not working. I guess this could be because in the browser there is context related to the recipient schema. I have tried out a lot of things, but it is not working for me. 

I am working with Adobe campaign classic.

Can anyone help me , how to just create a simple web app to update a schema other than the recipeint schema.?

 

Thank you,

Abhijeet

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Manoj_Kumar
Community Advisor
Community Advisor
August 31, 2021

Hello @abhisr 

 

You can update the custom schema by using Data oriented APIs.

 

Here is a sample code on how to update a customer schema.

xtk.session.write(<customSchemaName _operation="insert" columnName="value" xtkschema="namespace:customSchemaName"/>)

More details are available here: https://experienceleague.adobe.com/docs/campaign-classic/using/configuring-campaign-classic/api/data-oriented-apis.html?lang=en#example-with-the--write--method

 

 

 

Manoj  | https://themartech.pro
AbhiSrAuthor
Level 2
August 31, 2021

Hi Manoj,

I have kept nms:recipient as the document type in the web app and I have a js activity with the below code.

xtk.session.Write(<offerActivation _operation="update" _key="@salesforceId" offerStatus="as" xtkschema="bp:offerActivation"/>)

 

I am getting the below error:

 

QUE-370007 Unable to find key values for element 'Offer Activation ' (document with schema 'offerActivation') XSV-350023 Unable to save document of type 'Offer Activation (bp:offerActivation)'. SOP-330011 Error while executing the method 'Write' of service 'xtk:persist|xtk:session'.

AbhiSrAuthor
Level 2
August 31, 2021

In the preview mode, Are you selecing the recipient manually? If yes, Then you need to pass the encrypted recipient id parameter in the URL.

 

Also, You can make use of debug mode to trouble shoot issue and get more details on the error.


@_manoj_kumar_  Below is my url. I am passing the recipient id.

/webApp/APP7?id=<%=escapeUrl(cryptString(recipient.id))%>

Sukrity_Wadhwa
Community Manager
Community Manager
September 16, 2021

Hi @abhisr,

 

Were you able to resolve this query or do you still need more help here? Do let us know.

 

Thanks!

Sukrity Wadhwa