| Description | Query Campaign In (Operation FindByElements) |
| Name | QueryCampaignIn |
| 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 query campaign data.
The web service interface Query Campaign enables you to connect external applications to your SAP system and to query and read campaign data in your system. The web service interface is relevant if your company wants to access and manage campaign data from external applications.
It has the FindByElements operation which is used to query for one or more instances of the campaign based on the query filter parameters passed.
Example structure:
<n0:CampaignByElementsQuery_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <CampaignSelectionByElements> <SelectionByUUID>...</SelectionByUUID> <SelectionByID>...</SelectionByID> <SelectionByReferenceID>...</SelectionByReferenceID> <SelectionByPlannedStartDate>...</SelectionByPlannedStartDate> <SelectionByPlannedEndDate>...</SelectionByPlannedEndDate> <SelectionByDescription>...</SelectionByDescription> <SelectionByLifeCycleStatusCode>...</SelectionByLifeCycleStatusCode> <SelectionBySystemAdministrativeDataCreationDateTime>...</SelectionBySystemAdministrativeDataCreationDateTime> <SelectionBySystemAdministrativeDataLastChangeDateTime>...</SelectionBySystemAdministrativeDataLastChangeDateTime> <SelectionByExecutionStepExecutionTypeCode>...</SelectionByExecutionStepExecutionTypeCode> <SelectionByExecutionStepTargetGroupID>...</SelectionByExecutionStepTargetGroupID> <SelectionByExecutionStepTargetGroupDescription>...</SelectionByExecutionStepTargetGroupDescription> <SelectionBySearchText>...</SelectionBySearchText> </CampaignSelectionByElements> <ProcessingConditions> <QueryHitsMaximumNumberValue>100</QueryHitsMaximumNumberValue> <QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator> <LastReturnedObjectID/> </ProcessingConditions> <RequestedElements campaignTransmissionRequestCode="2"> <Campaign executionStepTransmissionRequestCode="2" detailedDescriptionTextTransmissionRequestCode="2" attachmentFolderTransmissionRequestCode="2"/> </RequestedElements> </n0:CampaignByElementsQuery_sync>
Campaigns should exist in the system in order to get a positive result.
Example:
<ProcessingConditions> <QueryHitsMaximumNumberValue>500</QueryHitsMaximumNumberValue> <QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator> </ProcessingConditions>
Example for requesting all data (code snippet):
<RequestedElements campaignTransmissionRequestCode="1" />
or (default is '1')
<RequestedElements />
or do not specify with element.
Example for requesting the root and the execution step data (code snippet):
<RequestedElements campaignTransmissionRequestCode="2"> <Campaign executionStepTransmissionRequestCode="2"/> </RequestedElements>
Example for requesting all except the attachment folder (code snippet):
<RequestedElements campaignTransmissionRequestCode="1"> <Campaign attachmentFolderTransmissionRequestCode="4"/> </RequestedElements>
You can find general information about Web services, their structure and consumption in the Web Services documentation.
Possible scenarios include the following:
Find a Campaign
With a certain campaign ID
With a certain name
Etc.
Example to find a campaign with a certain ID:
Step1: Query Campaign by ID
Request:
<n0:CampaignByElementsQuery_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global">
<CampaignSelectionByElements>
<SelectionByID>
<InclusionExclusionCode>I</InclusionExclusionCode>
<IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>
<LowerBoundaryIdentifier>623</LowerBoundaryIdentifier>
<UpperBoundaryIdentifier></UpperBoundaryIdentifier>
</SelectionByID>
</CampaignSelectionByElements>
<ProcessingConditions>
<QueryHitsUnlimitedIndicator>true</QueryHitsUnlimitedIndicator>
<LastReturnedObjectID/>
</ProcessingConditions>
<RequestedElements campaignTransmissionRequestCode="2">
<Campaign executionStepTransmissionRequestCode="4"
detailedDescriptionTextTransmissionRequestCode="4"
attachmentFolderTransmissionRequestCode="4"/>
</RequestedElements>
</n0:CampaignByElementsQuery_sync>
Step2: Update the Campaign by attachment
Request:
<n0:CampaignBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global">
<BasicMessageHeader/>
<Campaign actionCode="02">
<UUID>00163e02-8b12-1ee1-af8a-9091d7ad6dc0</UUID>
<LifeCycleStatusCode>1</LifeCycleStatusCode>
<AttachmentFolder DocumentListCompleteTransmissionIndicator="true" ActionCode="01">
<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>
The reponse to the update 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>20120622102517.9507680</ChangeStateID>
<ReferenceObjectNodeSenderTechnicalID />
<UUID>00163e02-8b12-1ee1-af8a-9091d7ad6dc0</UUID>
<ID>672</ID>
</Campaign>
<Log />
</nm:CampaignBundleMaintainConfirmation_sync>
| Description | Find campaigns |
| Name | FindByElements |
| Synchronous | yes |
| Release Status | Deprecated |
To query campaign data by elements.
The request message of the operation FindByElements contains the QueryByElements that groups all possible selection parameters.
| Selection Parameter | UI elements |
|---|---|
| SelectionByID | no UI element, campaign ID |
| SelectionByReferenceID | no UI element, campaign ID in external system |
| SelectionByPlannedStartDate | The start date is the specification of an exact day in the Gregorian calendar. |
| SelectionByPlannedEndDate | The end date is the specification of an exact day in the Gregorian calendar. |
| SelectionByDescription | Name |
| SelectionByLifeCycleStatusCode | Status |
| SelectionBySystemAdministrativeDataCreationDateTime | The point-in-time, when the campaign is created. It is an accurate-to-the-second time-point of a calendar day in time zone UTC. |
| SelectionBySystemAdministrativeDataLastChangeDateTime | no UI element; the point-in-time, when the campaign is changed. It is an accurate-to-the-second time-point of a calendar day in time zone UTC. |
| SelectionByExecutionStepExecutionTypeCode | Campaign Type |
| SelectionByExecutionStepTargetGroupID | no UI element, ID of assigned target group |
| SelectionByExecutionStepTargetGroupDescription | Target Group |
The supported Interval Boundary Type Code values depend on the type of the selection element:
| Selection Parameter Type | Supported Interval Boundary Type Code values |
|---|---|
| ID | All values are allowed. |
| Date | All values are allowed. |
| Date Time | All values are allowed. |
| Description | All values are allowed; if you enter value '1' (= Equal to) it means that you are searching for an entry that is exactly equal to the search term; if you enter a search term with '*' (wildcard) in the value it means that you are searching for entries that contain the search term; for example, if you enter 'ABC*' then the system searches for all entries that are beginning with 'ABC'. |
| Code | Only value '1' (= Equal to) without wildcards is allowed. |
Example: Query 13 active E-Mail Campaigns for a given Target Group ID 71
Request:
<n0:CampaignByElementsQuery_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global">
<CampaignSelectionByElements>
<SelectionByExecutionStepExecutionTypeCode>
<InclusionExclusionCode>I</InclusionExclusionCode>
<IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>
<LowerBoundaryCode>1</LowerBoundaryCode>
</SelectionByExecutionStepExecutionTypeCode>
<SelectionByExecutionStepTargetGroupID>
<InclusionExclusionCode>I</InclusionExclusionCode>
<IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>
<LowerBoundaryIdentifier>71</LowerBoundaryIdentifier>
</SelectionByExecutionStepTargetGroupID>
<SelectionByLifeCycleStatusCode>
<InclusionExclusionCode>I</InclusionExclusionCode>
<IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>
<LowerBoundaryCode>2</LowerBoundaryCode>
</SelectionByLifeCycleStatusCode>
</CampaignSelectionByElements>
<ProcessingConditions>
<QueryHitsMaximumNumberValue>100</QueryHitsMaximumNumberValue>
<QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator>
<LastReturnedObjectID/>
</ProcessingConditions>
<RequestedElements campaignTransmissionRequestCode="2">
<Campaign executionStepTransmissionRequestCode="2"
detailedDescriptionTextTransmissionRequestCode="2"
attachmentFolderTransmissionRequestCode="2"/>
</RequestedElements>
</n0:CampaignByElementsQuery_sync>
Example: Query a Campaign by Name/Description
Request:
<n0:CampaignByElementsQuery_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global">
<CampaignSelectionByElements>
<SelectionByDescription>
<InclusionExclusionCode>I</InclusionExclusionCode>
<IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>
<LowerBoundaryName>Summer Campaign</LowerBoundaryName>
</SelectionByDescription>
</CampaignSelectionByElements>
<ProcessingConditions>
<QueryHitsMaximumNumberValue>50</QueryHitsMaximumNumberValue>
<QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator>
<LastReturnedObjectID/>
</ProcessingConditions>
<RequestedElements campaignTransmissionRequestCode="2">
<Campaign executionStepTransmissionRequestCode="2"
detailedDescriptionTextTransmissionRequestCode="2"
attachmentFolderTransmissionRequestCode="2"/>
</RequestedElements>
</n0:CampaignByElementsQuery_sync>
The response contains the list of found campaigns, log items, and processing conditions.
Show full documentation