Salesforce

Sugar - XML (Magic xpi 4.5)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

Sugar - XML (Magic xpi 4.5)

The Sugar connector is designed to work with Magic xpi’s XML interface. When you drag the Sugar connector into a flow, the Properties pane opens. Then, double-click or right-click on the connector and select Configuration from the context menu to open the Sugar Configuration dialog box.

This dialog box contains the following fields:

Property

Description

Connection

Resource Name

The name of the resource that you selected in the component's Properties pane. The resources are defined in the Settings dialog box's Resources section.

Operation

Module

Click to open the Modules List. Select the module that the operation will be performed on.

Operation

Select one of the following operations from the drop-down list:

  • Query: This is used to retrieve data from a Sugar module. You can use the Data Mapper to retrieve objects based on specific criteria. Advanced users can apply custom filters to the query by using the Data Mapper's WHERE element (in the SQL node) for the Legacy API or the FILTER element (in the Request_Arguments node) in the newer V10 API. For example, to query for data where the last_name='Smith' and the first_name='John', you should use this WHERE clause in the Legacy API:
    Contacts.last_name='Smith'AND Contacts.first_name='John'

Note:

If you reference a field in the WHERE clause, you must include the table name and the field name (expressed in the following syntax: <DB_TableName>.<FieldName>), and not the module name or the field name on its own. The WHERE clause is sent directly to the database.

In the V10 API, you should use this FILTER clause:
filter[0][first_name][$starts]=John&filter[0][last_name]=Smith

Magic xpi passes the filters as is to Sugar, so you can use any of their supported filter operations. You can find a list of the filter operations on the Sugar site.

  • Create: This is used to create new objects in your organization’s data. You can use the Data Mapper to specify new object fields’ values.

  • Update: This is used to update specific objects in your organization’s data. When you update an object, you need to know its ID. For example, you can use the Query operation (above) to retrieve an object ID, and then you can call the Update operation. You should use the Data Mapper to set the object ID, as well as the other fields that you want to update.

  • Delete: This is used to delete a specific object from your organization’s data. If you want to delete an object, you need to know its ID. For example, you can use the Query operation (above) to retrieve an object ID, and then you can call the Delete operation. You should use the Data Mapper to set the object ID. This is the only value that you should set.

Return Fields

This field is only available when you select Query in the Operation field.

You can choose All by selecting the adjacent check box, or you can select specific fields from the Module Fields List.

Results Per Chunk

This optional field is only available when you select Query in the Operation field.

The maximum number of results that you want to fetch in each call to Sugar. If you enter 0 or leave the field blank, 2000 results will be returned.

This means that if your query result contains 4500 objects, and the Results Per Chunk parameter's value is set to 1000, the Sugar connector will perform five query calls to Sugar to fetch the entire result set.

Batch Size

This field is only available when you select Create, Update, or Delete in the Operation field.

The maximum number of entities sent in each request to Sugar.

This means that if you try to update 1000 accounts in Sugar, and the Batch Size parameter's value is set to 300, the Sugar connector will perform four Update calls to Sugar.

Return Deleted

Select this check box if you want to return, in the query result, the entities defined as deleted.

New Object ID

This field is only available when you select Create in the Operation field.

Click to open the Variables List and select a variable that will hold the object ID that was created.

Result Options

Store result in

Defines where you want to store the resulting XML file. Select one of the following from the drop-down list:

  • File: Select a file to hold the object data that is returned by Sugar. Click to open the Expression Editor or click and enter the file path where this information is to be stored.

  • Variable (default is C.UserBlob): Select a variable to hold the object data that is returned by Sugar.
    Click to open the Variables List. Select a variable where this information is to be stored.

  • Split files: Splits a large XML file into several smaller XML files. If you select this option, you need to enter the required information in the Split Files Options section of this dialog box (below).

Operation success

This field lets you easily determine if the data object was successfully located in Sugar. Select one of the following from the drop-down list:

  • None (default): Select this option if you do not want to save the connector’s success or failure status.

  • Variable: Select the variable where you want to store the connector's success or failure status.

Split Files Options

Directory

The directory holding the split files. Click to open the Expression Editor and enter the directory name.

Prefix

The prefix of the split files. Click to open the Expression Editor and enter the prefix.

Records per file

The number of records in each split file. Click to open the Expression Editor and enter the required number of records.

Number of splits

The numeric variable where the number of splits will be returned to. Click to open the Variables List and select the required variable.

The Sugar Configuration dialog box contains the following additional button:

Button

Description

Refresh XSD

Refreshes the current schema.

When you click Refresh XSD, the current schema is overwritten. A message dialog opens, and clicking OK confirms the update and the overwrite. Clicking Cancel exits the process without updating the schema.

Related Topics

Sugar - Referencing Objects by IDs

Reference
Attachment 
Attachment