| Description | Manage Marketing Campaigns |
| Name | ManageCampaignIn |
| Namespace | http://sap.com/xi/A1S/Global |
| Process Component Description | Campaign Management |
| Process Component Name | CampaignManagement |
| Process Component Namespace | http://sap.com/xi/AP/CRM/Global |
| Deploymnent Unit Description | Customer Relationship Management |
| Endpoint Activation | By Scoping of Process Component | Operations |
| Release Status | Deprecated |
An interface to replicate campaigns from a source system or file to a target system.
The web service interface ManageCampaignIn enables you to connect external applications to your SAP system and to create, edit and delete campaigns in your system. The web service interface ManageCampaignIn is relevant if your company wants to access and manage campaign data from external applications.
The web service interface Manage Campaign In offers the operations MaintainBundle and CheckMaintainBundle.
Existence of referenced business data:
The following business data are only referenced and will not be created by the service operations. They must exist in the system already at the time the web service is called.
For adding or maintaining TargetGroup information to a campaign, such target groups need to be maintained in the system.
You can find general information about Web services, their structure and consumption in the Web Services documentation.
Possible scenarios include the following:
Create Campaigns
The MaintainBundle operation is used to create campaigns.
Update Campaigns
The MaintainBundle operation is used to update campaigns.
In the following scenario, a campaign is created. At a later point in time this campaign is queried (query call using A2X QueryCampaignIn (operation: FindByElements) ) .
Consumer adds a document at the root and updates the campaign.
Request:
<n0:CampaignBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global">
<BasicMessageHeader>
<ID>00300571D06B1DED9EE4723F124207BC</ID>
</BasicMessageHeader>
<Campaign>
<ObjectNodeSenderTechnicalID>10000</ObjectNodeSenderTechnicalID>
<Description>A2X Manage Bundle In 2012/06/13</Description>
<PlannedStartDate>2012-06-13</PlannedStartDate>
<PlannedEndDate>2012-07-27</PlannedEndDate>
<LifeCycleStatusCode>1</LifeCycleStatusCode>
<ExecutionStep trackingLinkListCompleteTransmissionIndicator="false">
<TargetGroupID>362</TargetGroupID>
<ExecutionTypeCode>1</ExecutionTypeCode>
<TrackingLink actionCode="01">
<ObjectNodeSenderTechnicalID>10011</ObjectNodeSenderTechnicalID>
<WebURI>http://www...</WebURI>
</TrackingLink>
<TrackingLink actionCode="01">
<ObjectNodeSenderTechnicalID>10012</ObjectNodeSenderTechnicalID>
<WebURI>http://www...</WebURI>
</TrackingLink>
</ExecutionStep>
<DetailedDescriptionText actionCode="04">
<ObjectNodeSenderTechnicalID>11000</ObjectNodeSenderTechnicalID>
<ContentText>Campaign Note </ContentText>
</DetailedDescriptionText>
</Campaign>
</n0:CampaignBundleMaintainRequest_sync>
Response for the request looks like:
<nm:CampaignBundleMaintainConfirmation_sync xmlns:nm="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:ALP:/1SAI/TAE6FD14FD49A2246F547C3:804">
<Campaign>
<ChangeStateID>20120627074556.5579770</ChangeStateID>
<ReferenceObjectNodeSenderTechnicalID />
<UUID>00163e02-8b34-1ee1-afed-037b699d9b3d </UUID>
<ID>711</ID>
</Campaign>
<Log />
</nm:CampaignBundleMaintainConfirmation_sync>
Request:
<n0:CampaignByElementsQuery_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global">
<CampaignSelectionByElements>
<SelectionByID>
<InclusionExclusionCode>I</InclusionExclusionCode>
<IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>
<LowerBoundaryIdentifier>711</LowerBoundaryIdentifier>
<UpperBoundaryIdentifier></UpperBoundaryIdentifier>
</SelectionByID>
</CampaignSelectionByElements>
<ProcessingConditions>
<QueryHitsUnlimitedIndicator>true</QueryHitsUnlimitedIndicator>
<LastReturnedObjectID/>
</ProcessingConditions>
<RequestedElements campaignTransmissionRequestCode="2">
<Campaign executionStepTransmissionRequestCode="2" detailedDescriptionTextTransmissionRequestCode="2" attachmentFolderTransmissionRequestCode="2"/>
</RequestedElements>
</n0:CampaignByElementsQuery_sync>
Note: Due to the complete transmission indicator at attachment node, it is expected that all attachments are sent with this service. In case there are attachments available in the system for that campaign which are not sent with the A2X service, these attachments will be removed from the system.
In this example only one attachment will be available in the system for that campaign after the service has been executed.
Request:
<n0:CampaignBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global">
<BasicMessageHeader>
<ID>00300571D06B1DED9EE4723F124207BC</ID>
</BasicMessageHeader>
<Campaign actionCode="02">
<ID>711</ID>
<LifeCycleStatusCode>1</LifeCycleStatusCode>
<AttachmentFolder DocumentListCompleteTransmissionIndicator="true" ActionCode="02">
<UUID>00163e02-8b34-1ee1-afed-13c8176e5b6f</UUID>
<Document>
<VisibleIndicator>true</VisibleIndicator>
<CategoryCode>2</CategoryCode>
<TypeCode>10001</TypeCode>
<MIMECode>text/plain</MIMECode>
<Name>New Text Document(2).txt</Name>
<AlternativeName>Test Document (txt) 2</AlternativeName>
<Description>This is a file attachment</Description>
<FileContent ActionCode="01">
<BinaryObject mimeCode="text/plain">VGhpcyBpcyBhIHRlc3QgZG9jdW1lbnQu</BinaryObject>
</FileContent>
</Document>
</AttachmentFolder>
</Campaign>
</n0:CampaignBundleMaintainRequest_sync>
And the reponse looks like (service executed successfully):
<nm:CampaignBundleMaintainConfirmation_sync xmlns:nm="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:ALP:/1SAI/TAE6FD14FD49A2246F547C3:804">
<Campaign>
<ChangeStateID>20120626083801.4789500</ChangeStateID>
<ReferenceObjectNodeSenderTechnicalID />
<UUID>00163e02-8b34-1ee1-afed-037b699d9b3d</UUID>
<ID>711</ID>
</Campaign>
<Log />
</nm:CampaignBundleMaintainConfirmation_sync>
| Description | Maintain campaigns |
| Name | MaintainBundle |
| Synchronous | yes |
| Release Status | Deprecated |
To create, update or delete one or more campaigns using imported structured data.
The request message of the operation MaintainBundle contains a BasicMessageHeader node element as well as a Campaign node element that contains the data to be created or updated. The detailed structure of the node will be explained in the following sub-chapters. The node can occur multiple times in the request message – this means that multiple campaigns can be created and updated through a single web service request.
The response message type of the operation MaintainBundle contains log items, processing information, and a campaign specific node with ReferenceObjectNodeSenderTechnicalID, ChangeStateID, as well as ID and UUID.
The Campaign node element contains all general campaign information such as ID, UUID, name, priority code, and other data.
The data for this node is related to general data on the Campaign UI.
Either UUID, ID or ReferenceID has to be used for specifying a marketing campaign which shall be updated.
UUID: Unique identifier of marketing campaigns in case of change requests. It will be generated internally in case of creation.
ID: Identifier of a marketing campaign in the actual system in case of change requests. It will be generated internally in case of creation.
ReferenceID: Identifier for a unique reference to a marketing campaign in an external system.
The element shows the start date of a campaign. The date is the specification of an exact day in the Gregorian calendar.
Example:
<PlannedStartDate>2002-04-19</PlannedStartDate>
The element shows the end date of a campaign. The date is the specification of an exact day in the Gregorian calendar.
Example:
<PlannedEndDate>2002-04-19</PlannedEndDate>
The description is the name of a campaign. It describes a campaign as it will be shown in the UI.
The element LifeCycleStatusCode indicates the status of a campaign.
Code vales for LifeCycleStatusCode:
| Code value | Description |
|---|---|
| 1 | Planned |
| 2 | Active |
| 3 | Finished |
| 4 | Canceled |
Changing the status code to status 1 is not allowed. Status Planned (1) can be maintained initially only.
Status Active (2) can only be set for campaign execution type code External Execution (7).
Status Active (2) can be either changed to Finished (3) or Canceled (4).
Both status Finished (3) and Canceled (4) can be modified to status Active (2) only.
The element shows the date when a campaign is created.
Example: Modify the root node elements of a marketing campaign
Request for marketing campaign ID 111:
<n0:CampaignBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global">
<BasicMessageHeader>
<ID>00300571D06B1DED9EE4723F124207BC</ID>
</BasicMessageHeader>
<Campaign actionCode="02">
<ID>111</ID>
<PlannedStartDate>2012-09-14</PlannedStartDate>
<PlannedEndDate>2012-12-27</PlannedEndDate>
<LifeCycleStatusCode>1</LifeCycleStatusCode>
</Campaign>
</n0:CampaignBundleMaintainRequest_sync>
The node execution step has information about campaign execution, like target group assigned to a campaign and the type of execution (E-mail, Fax, Letter, Phone Call).
The element shows the identifier for a target group which is assigned to the campaign.
The attribute shows the campaign type.
Code values for ExecutionTypeCode:
| Code value | Description |
|---|---|
| 1 | E-Mail using file export |
| 2 | Fax using file export |
| 3 | Letter using file export |
| 4 | Phone Call using file export |
| 7 | External Execution |
We recommend, using execution type 'External Execution' (code value '7') in case you execute a campaign in an external system.
Example: Modify the target group and Execution type of a marketing campaign
Request for marketing campaign UUID 00163e02-8b34-1ee1-afed-037b699d9b3d:
<n0:CampaignBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global">
<BasicMessageHeader>
<ID>00300571D06B1DED9EE4723F124207BC</ID>
</BasicMessageHeader>
<Campaign actionCode="02">
<UUID>00163e02-8b34-1ee1-afed-037b699d9b3d</UUID>
<LifeCycleStatusCode>2</LifeCycleStatusCode>
<ExecutionStep>
<TargetGroupID>401</TargetGroupID>
<ExecutionTypeCode>4</ExecutionTypeCode>
</ExecutionStep>
</Campaign>
</n0:CampaignBundleMaintainRequest_sync>
The node tracking link comprises information about the target hyperlink URLs. Hyperlink clicks are tracked and redirected to a website using the target hyperlink URL.
UUID: Unique identifier of a target hyperlink URL. It will be generated internally in case of creation.
TargetLinkWebURI: URI of the target hyperlink.
actionCode: Instruction for the tracking link node.
A text is unstructured, readable information that contains additional formatting. The type of text can be specified using the TypeCode. Campaigns allow TypeCode 10006 “Detailed Description” only. This will be maintained automatically by the system and cannot be influenced by the service interface.
Language information is not stored.
This element describes the unstructured data of the text.
Example: Add a detailed description text to a marketing campaign
Request for marketing campaign UUID 00163e02-8b34-1ee1-afed-037b699d9b3d:
<n0:CampaignBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global">
<BasicMessageHeader>
<ID>00300571D06B1DED9EE4723F124207BC</ID>
</BasicMessageHeader>
<Campaign actionCode="02">
<UUID>00163e02-8b34-1ee1-afed-037b699d9b3d</UUID>
<DetailedDescriptionText actionCode="04">
<ObjectNodeSenderTechnicalID>11000</ObjectNodeSenderTechnicalID>
<ContentText>Campaign Note</ContentText>
</DetailedDescriptionText>
</Campaign>
</n0:CampaignBundleMaintainRequest_sync>
An Attachment Folder is the collection of all documents attached to a campaign.
| Attributes | Description |
|---|---|
| DocumentListCompleteTransmissionIndicator | Refer „General Rules‟ section for more details. |
| actionCode | Refer „General Rules‟ section for more details. |
A document is an attachment that was assigned to the attachment folder and contains unstructured information, additional control, and monitoring information.
| Attributes | Description |
|---|---|
| DocumentListCompleteTransmissionIndicator | Refer „General Rules‟ section for more details. |
| actionCode | Refer „General Rules‟ section for more details. |
Universally unique identifier of the document
Specifies whether a document is visible or not.
A coded representation of the document type.
Most general attachments are of type '10001'.
A coded representation of the MIMECode of a document.
Name of a document that identifies the document within its higher-level folder The Name is the same as the last component of the DocumentPathName. All characters (apart from the separator “/”) are allowed in the name
Language-independent name of a document.
Language-independent description of a document.
Destination URI (if the link is external)
Describes the unstructured data in binary form.
Example: Add two attachments to a marketing campaign
Request for marketing campaign ID 711:
<n0:CampaignBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global">
<BasicMessageHeader>
<ID>00300571D06B1DED9EE4723F124207BC</ID>
</BasicMessageHeader>
<Campaign actionCode="02">
<ID>711</ID>
<AttachmentFolder DocumentListCompleteTransmissionIndicator="true" ActionCode="01">
<Document>
<VisibleIndicator>true</VisibleIndicator>
<CategoryCode>2</CategoryCode>
<TypeCode>10001</TypeCode>
<MIMECode>text/plain</MIMECode>
<Name>New Text Document(2).txt</Name>
<AlternativeName>Test Document (txt)</AlternativeName>
<Description>This is a file attachment</Description>
<FileContent ActionCode="01">
<BinaryObject mimeCode="text/plain">VGhpcyBpcyBhIHRlc3QgZG9jdW1lbnQu</BinaryObject>
</FileContent>
</Document>
<Document>
<VisibleIndicator>true</VisibleIndicator>
<CategoryCode>3</CategoryCode>
<TypeCode>10001</TypeCode>
<Name>www.testlink.com</Name>
<AlternativeName>Test Link</AlternativeName>
<Description>This is atest Link</Description>
<ExternalLinkWebURI>http://www.testlink.com</ExternalLinkWebURI>
<FileContentURI>http://www.testlink.com</FileContentURI>
</Document>
</AttachmentFolder>
</Campaign>
</n0:CampaignBundleMaintainRequest_sync>
Request for creation:
<n0:CampaignRequestBundleCheckMaintainQuery_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global">
<BasicMessageHeader>
<ID>00300571D06B1DED9EE4723F124207BC</ID>
</BasicMessageHeader>
<Campaign>
<ObjectNodeSenderTechnicalID>10001</ObjectNodeSenderTechnicalID>
<Description>Simulate creation</Description>
<PlannedStartDate>2012-06-13</PlannedStartDate>
<PlannedEndDate>2012-07-27</PlannedEndDate>
<LifeCycleStatusCode>1</LifeCycleStatusCode>
<ExecutionStep trackingLinkListCompleteTransmissionIndicator="false">
<TargetGroupID>362</TargetGroupID>
<ExecutionTypeCode>1</ExecutionTypeCode>
<TrackingLink actionCode="01">
<ObjectNodeSenderTechnicalID>10011</ObjectNodeSenderTechnicalID>
<TargetLinkWebURI>http://www.....</TargetLinkWebURI>
</TrackingLink>
<TrackingLink actionCode="01">
<ObjectNodeSenderTechnicalID>10012</ObjectNodeSenderTechnicalID>
<TargetLinkWebURI>http://www...</TargetLinkWebURI>
</TrackingLink>
</ExecutionStep>
<DetailedDescriptionText actionCode="04">
<ObjectNodeSenderTechnicalID>11000</ObjectNodeSenderTechnicalID>
<ContentText>Campaign Note </ContentText>
</DetailedDescriptionText>
</Campaign>
<Campaign>
<ObjectNodeSenderTechnicalID>20001</ObjectNodeSenderTechnicalID>
<Description>Simulate creation</Description>
<PlannedStartDate>2012-06-13</PlannedStartDate>
<PlannedEndDate>2012-07-27</PlannedEndDate>
<LifeCycleStatusCode>1</LifeCycleStatusCode>
<ExecutionStep>
<TargetGroupID>362</TargetGroupID>
<ExecutionTypeCode>1</ExecutionTypeCode>
</ExecutionStep>
<DetailedDescriptionText actionCode="04">
<ObjectNodeSenderTechnicalID>21000</ObjectNodeSenderTechnicalID>
<ContentText>Campaign Note </ContentText>
</DetailedDescriptionText>
</Campaign>
</n0:CampaignRequestBundleCheckMaintainQuery_sync>
Response (creation ends successfully)
<nm:CampaignBundleMaintainConfirmation_sync xmlns:nm="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:ALP:/1SAI/TAE6FD14FD49A2246F547C3:804">
<Campaign>
<ChangeStateID>20130220081016.7946350</ChangeStateID>
<ReferenceObjectNodeSenderTechnicalID>20001</ReferenceObjectNodeSenderTechnicalID>
<UUID>00163e02-8b2e-1ed2-9ee6-9eb6ed736348</UUID>
<ID>3039</ID>
</Campaign>
<Campaign>
<ChangeStateID>20130220081016.7946350</ChangeStateID>
<ReferenceObjectNodeSenderTechnicalID>10001</ReferenceObjectNodeSenderTechnicalID>
<UUID>00163e02-8b2e-1ed2-9ee6-9eb6ed734348</UUID>
<ID>3038</ID>
</Campaign>
<Log/>
</nm:CampaignBundleMaintainConfirmation_sync>
Request for changing marketing campaign ID 3038
<n0:CampaignBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global">
<BasicMessageHeader>
<ID>00300571D06B1DED9EE4723F124207BC</ID>
</BasicMessageHeader>
<Campaign>
<ChangeStateID>20130220081016.7946350</ChangeStateID>
<ObjectNodeSenderTechnicalID>10001</ObjectNodeSenderTechnicalID>
<ID>3038</ID>
<ExecutionStep trackingLinkListCompleteTransmissionIndicator="false">
<TrackingLink>
<ObjectNodeSenderTechnicalID>10011</ObjectNodeSenderTechnicalID>
<UUID>00163E02-8B2E-1ED2-9EE6-9EB6ED73C348</UUID>
<TargetLinkWebURI>http://www...</TargetLinkWebURI>
</TrackingLink>
</ExecutionStep>
</Campaign>
</n0:CampaignBundleMaintainRequest_sync>
Response (creation ends successfully)
<nm:CampaignBundleMaintainConfirmation_sync xmlns:nm="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:ALP:/1SAI/TAE6FD14FD49A2246F547C3:804">
<Campaign>
<ChangeStateID> 20130220081016.7946350</ChangeStateID>
<ReferenceObjectNodeSenderTechnicalID>10001</ReferenceObjectNodeSenderTechnicalID>
<UUID>00163e02-8b2e-1ed2-9ee6-9eb6ed734348</UUID>
<ID>3038</ID>
</Campaign>
<Log/>
</nm:CampaignBundleMaintainConfirmation_sync>
| Description | Check campaigns |
| Name | CheckMaintainBundle |
| Synchronous | yes |
| Release Status | Deprecated |
To check whether one or more campaigns can be created, updated, or deleted without errors using imported structured data.
The web service request- and response message types for the CheckMaintainBundle operation are the same as those of the MaintainBundle operation. The explanations given can therefore also be applied to the CheckMaintainBundle operation.
Show full documentation