Skip to main content
somasundaram_h
Community Advisor
Community Advisor
Oct 3, 2019 8:06 AM UTC
Solved

Offer engine API in Adobe Campaign Classic

Team,

We're trying to use Adobe Offer API which is mentioned here in the document Integration via SOAP (server side) .

We tried to fetch all available offers using 'Propose' method and that works fine. UpdateStatus is also working fine.

My question is:

We are able to update the status in the 'Update status'. However, only one field is getting updated. I want to update multiple fields using the same API call. Is there any options to add custom parameter in the method? Or is there any custom methods can be added to the offer engine API?

Thanks,

Somasundaram

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Jyoti_Yadav
Jyoti_YadavAccepted solution
Level 8
Oct 23, 2019 11:09 AM UTC

Hi,

You need to change it in interaction.js javascript present at location: Administration --> Configuration --> Javascript --> interaction.js

Search for below block of code:

else if( "UpdateStatus" == strCommand )

      {

        var ctx = <ctx/>;

        var iStatus = undefined;

      

You need to write your logic for custom field update. Currently it is doing only for status update.

Thanks,

Jyoti

4 replies

somasundaram_h
Community Advisor
Community Advisor
Oct 3, 2019 11:51 AM UTC

To be more clear on this:

There are two main clarification in Offer management API:

1. Need to know if there are additional parameter can be passed through the offer 'UpdateStatus' API call.

Eg:

Working code:

<?xml version='1.0'?> <SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>

<SOAP-ENV:Body>

<UpdateStatus> <proposition>564032</proposition> <status>1</status></UpdateStatus>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Requirement:

<?xml version='1.0'?> <SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>

<SOAP-ENV:Body>

<UpdateStatus> <proposition>564032</proposition> <status>1</status><offerCode>Offer Code value</offerCode><customField1>Input 1</customField1><customField2>Input 2</customField2></UpdateStatus>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

where <offerCode>, <customField1>, <customField2> are fields of "nms:propositionRcp" table.

2. Need to know how to restrict eligibility rule at Offer level.

Current setup: Eligibility rule applies to recipient table. We can filter recipient for particular offer. And we can provide limited offers using <maxCount> xml value in API call.

Requirement: If there are 1000 recipients eligible with eligibility criteria, and if 100 recipients availed a particular offer, the offer should be disabled.

Thanks,

Somasundaram

Translate
Raj_Ganta-1
Level 5
Oct 4, 2019 3:37 PM UTC

1. for that you can follow the below syntax.

<urn:UpdateStatus>

<urn:sessiontoken></urn:sessiontoken>

<urn:proposition>434242</urn:proposition>

<urn:status>1</urn:status>

<urn:context>xxxxxxxx</urn:context>

</urn:UpdateStatus>

Translate
somasundaram_h
Community Advisor
Community Advisor
Oct 16, 2019 5:31 AM UTC

Thanks for your reply. But we're not using session token for offer api. If we use session token, that will be regular API calls. If I use the above code with/without session token, it's not working:(

Translate
Jyoti_Yadav
Jyoti_YadavAccepted solution
Level 8
Oct 23, 2019 11:09 AM UTC

Hi,

You need to change it in interaction.js javascript present at location: Administration --> Configuration --> Javascript --> interaction.js

Search for below block of code:

else if( "UpdateStatus" == strCommand )

      {

        var ctx = <ctx/>;

        var iStatus = undefined;

      

You need to write your logic for custom field update. Currently it is doing only for status update.

Thanks,

Jyoti

Translate