Description | Manage 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 |
Deployment Unit Description | Customer Relationship Management |
Endpoint Activation | By Scoping of Process Component | Operations |
Release Status | Released |
An interface to replicate Campaign data from a source system or file to a target system.
The web service interface Manage Campaign In enables you to connect external applications to your SAP Business ByDesign system and to receive structured campaign data from a source, such as a system or a file. This data is replicated or migrated to a target system either for a single campaign or for several campaigns by bundle.
The web service interface ManageCampaignIn2 offers the operation Maintain_Bundle.
Here is an example of a simple web service request:
<n0:CampaignBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader/> <Campaign actionCode="01"> <Description languageCode="EN">Campaign with Attaments</Description> <PlannedStartDate>1999-01-24</PlannedStartDate> <PlannedEndDate>1999-01-24</PlannedEndDate> <ExecutionStep> <TargetGroupID schemeID="Token 528" schemeAgencyID="Token 529">121</TargetGroupID> <CampaignExecutionStepExecutionTypeCode>2</CampaignExecutionStepExecutionTypeCode> <ExecuteCampaignActionIndicator>true</ExecuteCampaignActionIndicator> </ExecutionStep> <TextCollection actionCode="01"> <Text actionCode="01"> <ContentText languageCode="EN">New Campaign</ContentText> </Text> </TextCollection> <ResponseOption actionCode="01"> <ResponseOptionID schemeID="Token 553" schemeAgencyID="Token 554">01</ResponseOptionID> <DefaultIndicator>true</DefaultIndicator> </ResponseOption> </Campaign> </n0:CampaignBundleMaintainRequest_sync>
Existence of referenced business documents:
The following business documents 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:
Target Group
Response Option
Action codes represent an instruction to the recipient of the web service request to process transmitted message node elements.
Action Code | Description |
---|---|
01 | Create; the system returns an error message if the node element already exists. |
02 | Update; the system returns an error message if the node element does not exist. |
03 | Delete; the system returns an error message if the node element does not exist. |
04 | Save; the system creates or changes the node element data. |
05 | Remove; the system deletes the node element. If the node element does not exist, the system does not send an error message. |
06 | No Action; the system does not change the node element. |
Default action code: 04 (Save).
Note: Action code 04 (Save) creates business documents if the system could not identify a matching target business document. This applies in particular if no business document ID or UUID is provided by the web service consumer. The web service consumer (external application) is responsible for providing correct business document IDs or UUIDs and to avoid accidental creation of duplicate business documents.
The processing of node elements with cardinality > 1 (for example a list of descriptions in different languages or a list of telephone numbers) can be controlled using List Complete Transmission Indicators (LCTI). The LCTI indicates whether a list of node elements is transmitted completely. The LCTI of a node element with cardinality > 1 is modeled as an attribute of its parent node element.
LCTI | Description |
---|---|
false | The list of node elements is not transmitted completely and hence all node elements that are not transmitted remain unchanged.If transmitted node elements in the list can be identified uniquely, the system processes the node elements according the action code.If transmitted node elements in the list cannot be identified uniquely, the system appends the node element to the corresponding list of node elements in the target business document. |
true | The list of elements is transmitted completely and hence all node elements that are not transmitted are removed.If no node element is transmitted, the complete list is removed. |
Default list complete transmission indicator: false.
Note: The LCTI refers to the completeness of the list of node elements and does not state completeness of sub-elements.
Example
<AttachmentFolder DocumentListCompleteTransmissionIndicator="true" actionCode="01"> <UUID schemeID="Token 561" schemeAgencyID="Token 562">12345678-90AB-CDEF-0123- 456789ABCDEF</UUID> <Document PropertyListCompleteTransmissionIndicator="true" actionCode="01"> <UUID schemeID="Token 564" schemeAgencyID="Token 565">12345678-90AB-CDEF-0123- 456789ABCDEF</UUID> <VisibleIndicator>true</VisibleIndicator> <CategoryCode>2</CategoryCode> <MIMECode>text/plain</MIMECode> <Name>attachment 01.txt</Name> <AlternativeName>Test Doc</AlternativeName> <Description languageCode="EN">Test Doc</Description> <FileContent actionCode="01"> <BinaryObject mimeCode="text/plain" >5468697320697320616E206174746163686D656E7420666F722074657374696E672E</BinaryObject> </FileContent> </Document> </AttachmentFolder>
The ExecuteCampaignActionIndicator determines whether the campaign shall be executed when creating or not.
ExecuteCampaignActionIndicator | Description |
---|---|
false | Campaign will not be executed. |
true | Campaign will be executed. |
Default Execute Campaign Action Indicator: true.
Example
<ExecutionStep> <TargetGroupID >121</TargetGroupID> <CampaignExecutionStepExecutionTypeCode>2</CampaignExecutionStepExecutionTypeCode> <ExecuteCampaignActionIndicator>true</ExecuteCampaignActionIndicator> </ExecutionStep>
Maintain bundle operation is a mass-enabled stateless synchronous web service operation. Transferring or requesting amounts of data that are too large causes communication timeouts. The web service consumer is responsible for ensuring reasonable sizes of data for mass operations.
Maintain bundle and check maintain bundle operations support exactly one execution (idem potency). To ensure exactly one execution of web service requests, the web service consumer has to provide unique values for the elements ID or UUID of the BasicMessageHeader node element.
Using change state identifier (element name ChangeStateID), external applications can enforce that a modifying operation is not executed because the state of the business document has changed since the external application last read its data.
The change state ID is an uninterpretable string that is provided by query and read operations and can be utilized by all modifying operations. If the change state identifier is provided when calling a modifying operation, the system does not perform the operation if the state of the business document instance has changed since the change state ID was computed. If the change state ID is not provided by the web service consumer, the system performs the web service operation without checking the state of the business document.
The web service consumer (external application) is responsible for preventing accidental changes to business documents.
Request node elements with cardinality > 1 contain an object node sender technical identifier to relate response message elements and log items to corresponding node elements in the request message.
The object node sender technical identifiers are provided as ObjectNodeSenderTechnicalID in request message types and referred to as ReferenceObjectNodeSenderTechnicalID in corresponding response message types.
If the object node sender technical ID is initial, the object node sender technical ID of the parent node element in the request is returned as the reference object node sender technical ID. If the object node sender technical IDs of all parent node elements are initial, the reference object node sender technical ID is returned as initial as well.
Note: The values specified in the ObjectNodeSenderTechnicalID are transient values that establish the correspondence between elements for only a single call. The web service consumer is not required to specify them or to use the same values for different calls. Also, the service provider does not interpret these values at all, but returns them to the web service consumer instead in the ReferenceObjectNodeSenderTechnicalID elements.
Note: The ObjectNodeSenderTechnicalID is also used to identify failed business document modifications in a mass operation.
Example
Request:
<n0:CampaignBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader/> <Campaign actionCode="01"> <ObjectNodeSenderTechnicalID>Token 519</ObjectNodeSenderTechnicalID> <ChangeStateID>Token 520</ChangeStateID> <Description languageCode="EN">Campaign with Attaments</Description> <PlannedStartDate>1999-01-24</PlannedStartDate> <PlannedEndDate>1999-01-24</PlannedEndDate> <ExecutionStep> <TargetGroupID >121</TargetGroupID> <CampaignExecutionStepExecutionTypeCode>2</CampaignExecutionStepExecutionTypeCode> <ExecuteCampaignActionIndicator>true</ExecuteCampaignActionIndicator> </ExecutionStep> <TextCollection actionCode="01"> <Text actionCode="01"> <ContentText languageCode="EN">New Campaign</ContentText> </Text> </TextCollection> <ResponseOption actionCode="01"> <ResponseOptionID >01</ResponseOptionID> <DefaultIndicator>true</DefaultIndicator> </ResponseOption> </Campaign> </n0:CampaignBundleMaintainRequest_sync>
Response:
<n0:CampaignBundleMaintainConfirmation_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:ACL:/1SAI/TAS8E8116E6038B5EDBB094:804"> <Log> <MaximumLogItemSeverityCode>1</MaximumLogItemSeverityCode> <Item> <TypeID>025(/APCRM_CPG/)</TypeID> <CategoryCode>INC.BOI</CategoryCode> <SeverityCode>1</SeverityCode> <ReferenceObjectNodeSenderTechnicalID>Token 519</ReferenceObjectNodeSenderTechnicalID> <Note>Campaign Campaign with Attaments (421) executed successfully</Note> </Item> </Log> <Campaign> <ChangeStateID> 20160223082649.9019590</ChangeStateID> <ReferenceObjectNodeSenderTechnicalID>Token 519</ReferenceObjectNodeSenderTechnicalID> <ID>421</ID> <UUID>00163e07-3d62-1ee5-b6c0-e5d2008180d3</UUID> </Campaign> </n0:CampaignBundleMaintainConfirmation_sync>
The structure of the response message consists of two parts:
A business document-specific part containing information about IDs and UUIDs of the created and changed business documents
Log items containing system messages including errors, warnings, and information messages raised by the system during processing of the web service request
Many external applications consuming web services have special requirements and restrictions regarding the format of WSDLs. Some external applications require service definition WSDLs describing the web service signature. This is normally sufficient for the creation of static client-side proxies. Other external applications, normally those that do not create static client-side proxies, require binding WSDLs including
the endpoint definition and authentication policy information.
In both cases, it may be the case that the external application imposes special restrictions on the structure or the size of WSDLs.
Microsoft InfoPath requires binding WSDLs and considers elements with the attribute "minOccurs=0" as "mandatory". However "minOccurs=0" means "optional" in SAP web services. In order to circumvent this problem, the WSDL must be saved locally and an additional attribute "nillable=true" must be added to make a query parameter optional for Microsoft InfoPath.
For very small clients such as mobile devices, the size of the WSDL itself may become a problem. In most cases the client only requires a very small part of the signature, but due to the complexity of the WSDL they may end up with long run times during serialization of the request or deserialization of the response. In order to circumvent this problem, the WSDL must be saved locally and the optional parts of the signature have to be removed before the WSDL is imported or static client-side proxies are generated.
External applications have to take into account that web service request and response message types can be enhanced with additional elements and attributes. Enhancements can be created by SAP, SAP partners, and key users. Enhancements of request message types are always optional elements or attributes. The SAP system does not require the external application to provide values in the request. Enhancements of response message types can contain mandatory elements or attributes. The external application must be able to process the extended response successfully.
XML element and attribute names are always stable. Technical definitions of data types can be enhanced in a compatible way. This may result in changed data type names. External applications can rely on XML element names and attribute names, but should not rely on data type names.
Note: You can download the WSDL file for any web service here:
Application and User Management work center -> Input Output Management Communication -> Arrangement.
User Management work center -> Service Explorer view.
You can find the documentation of the global data types in the SAP Community Network: Go to http://scn.sap.com/docs/DOC-17516 and click View Document.
Possible scenarios include the following:
Create Campaigns
The Maintain_Bundle operation is used to create one or more campaigns using imported structured data.
<n0:CampaignBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader> <ID schemeID="Token 361" schemeAgencyID="Token 362" schemeAgencySchemeAgencyID="Tok">Token 364</ID> <UUID schemeID="Token 365" schemeAgencyID="Token 366">12345678-90AB-CDEF-0123- 456789ABCDEF</UUID> <ReferenceID schemeID="Token 367" schemeAgencyID="Token 368" schemeAgencySchemeAgencyID="Tok">Token 370</ReferenceID> <ReferenceUUID schemeID="Token 371" schemeAgencyID="Token 372">12345678-90AB-CDEF-0123- 456789ABCDEF</ReferenceUUID> </BasicMessageHeader> <Campaign actionCode="01"> <ObjectNodeSenderTechnicalID>Token 519</ObjectNodeSenderTechnicalID> <ChangeStateID>Token 520</ChangeStateID> <Description languageCode="EN">Campaign with Attaments</Description> <PlannedStartDate>1999-01-24</PlannedStartDate> <PlannedEndDate>1999-01-24</PlannedEndDate> <ExecutionStep> <TargetGroupID schemeID="Token 528" schemeAgencyID="Token 529">121</TargetGroupID> <CampaignExecutionStepExecutionTypeCode>2</CampaignExecutionStepExecutionTypeCode> <ExecuteCampaignActionIndicator>true</ExecuteCampaignActionIndicator> </ExecutionStep> <TextCollection actionCode="01"> <Text actionCode="01"> <ContentText languageCode="EN">New Campaign</ContentText> </Text> </TextCollection> <ResponseOption actionCode="01"> <ResponseOptionID schemeID="Token 553" schemeAgencyID="Token 554">01</ResponseOptionID> <DefaultIndicator>true</DefaultIndicator> </ResponseOption> <ResponseOption actionCode="01"> <ResponseOptionID schemeID="Token 557" schemeAgencyID="Token 558">02</ResponseOptionID> </ResponseOption> <AttachmentFolder DocumentListCompleteTransmissionIndicator="true" actionCode="01"> <UUID schemeID="Token 561" schemeAgencyID="Token 562">12345678-90AB-CDEF-0123- 456789ABCDEF</UUID> <Document PropertyListCompleteTransmissionIndicator="true" actionCode="01"> <UUID schemeID="Token 564" schemeAgencyID="Token 565">12345678-90AB-CDEF-0123- 456789ABCDEF</UUID> <VisibleIndicator>true</VisibleIndicator> <CategoryCode>2</CategoryCode> <MIMECode>text/plain</MIMECode> <Name>attachment 01.txt</Name> <AlternativeName>Test Doc</AlternativeName> <Description languageCode="EN">Test Doc</Description> <FileContent actionCode="01"> <BinaryObject mimeCode="text/plain" >5468697320697320616E206174746163686D656E7420666F722074657374696E672E</BinaryObject> </FileContent> </Document> <Document PropertyListCompleteTransmissionIndicator="true" ActionCode="01"> <LinkInternalIndicator></LinkInternalIndicator> <VisibleIndicator>true</VisibleIndicator> <CategoryCode>3</CategoryCode> <TypeCode listID="Token 57" listVersionID="Token 58" listAgencyID="Token 59" listAgencySchemeID="Token 60" listAgencySchemeAgencyID="Tok">10001</TypeCode> <MIMECode></MIMECode> <Name>www.sap.com</Name> <AlternativeName>Test link</AlternativeName> <InternalLinkUUID schemeID="Token 66" schemeAgencyID="Token 67">12345678-90AB-CDEF-0123- 456789ABCDEF</InternalLinkUUID> <Description languageCode="EN">String 68</Description> <ExternalLinkWebURI>http://www.sap.com</ExternalLinkWebURI> </Document> </AttachmentFolder> </Campaign>
Description | Maintain campaigns |
Name | MaintainBundle |
Synchronous | yes |
Release Status | Released |
To create one or more campaigns using imported structured data.
The Manage Campaign In Maintain as Bundle inbound operation maintains one or more campaigns based on campaign data. This data is replicated or migrated from a source, for example, a system or a file, to a target system.
The request message of the operation Maintain_Bundle contains a BasicMessageHeader node element as well as a campaign node element that contains the Campaign data to be created. The detailed structure of the Campaign node will be explained in the following sub-chapters. The Campaign node can occur multiple times in the request message – this means that multiple Campaign can be created through a single web service request.
The response message type of the operation Maintain_Bundle contains log items, processing information and a Campaign-specific node with ReferenceObjectNodeSenderTechnicalID, ChangeStateID, as well as Campaign UUID.
Action codes represent an instruction to the recipient of the web service request to process transmitted message node elements.
Action Code | Description |
---|---|
01 | Create; the system returns an error message if the node element already exists. |
02 | Update; the system returns an error message if the node element does not exist. |
03 | Delete; the system returns an error message if the node element does not exist. |
04 | Save; the system creates or changes the node element data. |
05 | Remove; the system deletes the node element. If the node element does not exist, the system does not send an error message. |
06 | No Action; the system does not change the node element. |
Default action code: 04 (Save).
Note: Action code 04 (Save) creates business documents if the system could not identify a matching target business document. This applies in particular if no business document ID or UUID is provided by the web service consumer. The web service consumer (external application) is responsible for providing correct business document IDs or UUIDs and to avoid accidental creation of duplicate business documents.
The executionStep node element can be used to do the execution for the campaign created.
ExecuteTypeCode | Description |
---|---|
1 | E-Mail using file export |
2 | Fax using file export |
3 | Letter using file export |
4 | Phone Call using file export |
The indicator is used to indicate whether the campaign will do the execution or not.
ExecuteCampaignActionIndicator | Description |
---|---|
X | Executed |
Non-Executed |
The ResponseOption node element can be used to add campaign response option.
Example
Define optionID and set the default indicator
<ResponseOption actionCode="01"> <ResponseOptionID >01</ResponseOptionID> <DefaultIndicator>true</DefaultIndicator> </ResponseOption>
The AttachmentFolder node element can be used to add campaign attachments.
Data for this node can be found on the campaign UI as attachments. On the user interface, files and links can be created. In the web service request, links and files are differentiated through the CategoryCode:
Category code | Description |
---|---|
2 | Document |
3 | Link |
To create link attachments, document elements must be as follows:
Element | Value |
---|---|
VisibleIndicator | true |
CategoryCode | 3 |
TypeCode | <none> |
AlternativeName | <Document Title> |
ExternalLinkWebURI | <link URI> |
Description | <Comment> |
To create file attachments, document elements must be as follows:
Element | Value |
---|---|
VisibleIndicator | true |
CategoryCode | 2 |
TypeCode | <none> |
Name | <Document Title> |
AlternativeName | <Document Title> |
Description | <Comment> |
Example
Create one or more campaigns using imported structured data.
<n0:CampaignBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <BasicMessageHeader> <ID schemeID="Token 361" schemeAgencyID="Token 362" schemeAgencySchemeAgencyID="Tok">Token 364</ID> <UUID schemeID="Token 365" schemeAgencyID="Token 366">12345678-90AB-CDEF-0123-456789ABCDEF</UUID> <ReferenceID schemeID="Token 367" schemeAgencyID="Token 368" schemeAgencySchemeAgencyID="Tok">Token 370</ReferenceID> <ReferenceUUID schemeID="Token 371" schemeAgencyID="Token 372">12345678-90AB-CDEF-0123-456789ABCDEF</ReferenceUUID> </BasicMessageHeader> <Campaign actionCode="01"> <ObjectNodeSenderTechnicalID>Token 519</ObjectNodeSenderTechnicalID> <ChangeStateID>Token 520</ChangeStateID> <Description languageCode="EN">Campaign with Attaments</Description> <PlannedStartDate>1999-01-24</PlannedStartDate> <PlannedEndDate>1999-01-24</PlannedEndDate> <ExecutionStep> <TargetGroupID schemeID="Token 528" schemeAgencyID="Token 529">121</TargetGroupID> <CampaignExecutionStepExecutionTypeCode>2</CampaignExecutionStepExecutionTypeCode> <ExecuteCampaignActionIndicator>true</ExecuteCampaignActionIndicator> </ExecutionStep> <TextCollection actionCode="01"> <Text actionCode="01"> <ContentText languageCode="EN">New Campaign</ContentText> </Text> </TextCollection> <ResponseOption actionCode="01"> <ResponseOptionID schemeID="Token 553" schemeAgencyID="Token 554">01</ResponseOptionID> <DefaultIndicator>true</DefaultIndicator> </ResponseOption> <ResponseOption actionCode="01"> <ResponseOptionID schemeID="Token 557" schemeAgencyID="Token 558">02</ResponseOptionID> </ResponseOption> <AttachmentFolder DocumentListCompleteTransmissionIndicator="true" actionCode="01"> <UUID schemeID="Token 561" schemeAgencyID="Token 562">12345678-90AB-CDEF-0123-456789ABCDEF</UUID> <Document PropertyListCompleteTransmissionIndicator="true" actionCode="01"> <UUID schemeID="Token 564" schemeAgencyID="Token 565">12345678-90AB-CDEF-0123-456789ABCDEF</UUID> <VisibleIndicator>true</VisibleIndicator> <CategoryCode>2</CategoryCode> <MIMECode>text/plain</MIMECode> <Name>attachment 01.txt</Name> <AlternativeName>Test Doc</AlternativeName> <Description languageCode="EN">Test Doc</Description> <FileContent actionCode="01"> <BinaryObject mimeCode="text/plain" >5468697320697320616E206174746163686D656E7420666F722074657374696E672E</BinaryObject> </FileContent> </Document> <Document PropertyListCompleteTransmissionIndicator="true" ActionCode="01"> <LinkInternalIndicator></LinkInternalIndicator> <VisibleIndicator>true</VisibleIndicator> <CategoryCode>3</CategoryCode> <TypeCode listID="Token 57" listVersionID="Token 58" listAgencyID="Token 59" listAgencySchemeID="Token 60" listAgencySchemeAgencyID="Tok">10001</TypeCode> <MIMECode></MIMECode> <Name>www.sap.com</Name> <AlternativeName>Test link</AlternativeName> <InternalLinkUUID schemeID="Token 66" schemeAgencyID="Token 67">12345678-90AB-CDEF-0123-456789ABCDEF</InternalLinkUUID> <Description languageCode="EN">String 68</Description> <ExternalLinkWebURI>http://www.sap.com</ExternalLinkWebURI> </Document> </AttachmentFolder> </Campaign>
Description | Check campaigns |
Name | CheckMaintainBundle |
Synchronous | yes |
Release Status | Released |
No documentation available.